This commit is contained in:
2021-04-06 18:25:30 +02:00
parent 62cde419f9
commit 2e648b4300
2 changed files with 8 additions and 2 deletions

View File

@@ -58,6 +58,7 @@
let index = mp.game.joaat(player.getVariable("AnimationData"));
let currentAnim = animationSyncData.animations[index];
let { id, name, animDict, animName, duration, loop, flag } = currentAnim;
let pair = pairData.find(pair => pair.from == name);
if (loop && !player.isPlayingAnim(animDict, animName, 3)) {
loadAnimDict(animDict, function () {
@@ -66,7 +67,7 @@
if (player == mp.players.local) {
blockInput = true;
}
} else if (!loop && player.isPlayingAnim(animDict, animName, 3)) {
} else if (!loop && player.isPlayingAnim(animDict, animName, 3) && !pair) {
if (player == mp.players.local) {
blockInput = false;
mp.events.callRemote("CLIENT:ClearAnimationData", player);

View File

@@ -319,8 +319,13 @@ namespace ReallifeGamemode.Server.Extensions
public static Vector3 GetInFrontOfPosition(this Player player)
{
player.ResetData("InFrontOf");
player.TriggerEvent("SERVER:GetInFrontPosition");
return player.GetData<Vector3>("InFrontOf");
while (true)
{
if (player.HasData("InFrontOf"))
return player.GetData<Vector3>("InFrontOf");
}
}
}
}