fix animation cut
This commit is contained in:
@@ -68,10 +68,13 @@
|
|||||||
blockInput = true;
|
blockInput = true;
|
||||||
}
|
}
|
||||||
} else if (!loop && player.isPlayingAnim(animDict, animName, 3) && !pair) {
|
} else if (!loop && player.isPlayingAnim(animDict, animName, 3) && !pair) {
|
||||||
|
let a = setInterval(function () {
|
||||||
if (player == mp.players.local) {
|
if (player == mp.players.local) {
|
||||||
blockInput = false;
|
blockInput = false;
|
||||||
mp.events.callRemote("CLIENT:ClearAnimationData", player);
|
mp.events.callRemote("CLIENT:ClearAnimationData", player);
|
||||||
}
|
}
|
||||||
|
clearInterval(a);
|
||||||
|
}, duration);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
@@ -79,6 +82,7 @@
|
|||||||
mp.events.addDataHandler("AnimationData", (entity: PlayerMp, string) => {
|
mp.events.addDataHandler("AnimationData", (entity: PlayerMp, string) => {
|
||||||
entity.clearTasksImmediately();
|
entity.clearTasksImmediately();
|
||||||
if (string == null) {
|
if (string == null) {
|
||||||
|
blockInput = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user