.
This commit is contained in:
@@ -72,28 +72,35 @@ export default function animationSync() {
|
||||
return;
|
||||
}
|
||||
|
||||
mp.gui.chat.push("transition to " + string);
|
||||
let playAnim = true;
|
||||
let a = setInterval(function () {
|
||||
let index = mp.game.joaat(string);
|
||||
let animData = animationSyncData.animations[index];
|
||||
|
||||
let index = mp.game.joaat(string);
|
||||
let animData = animationSyncData.animations[index];
|
||||
if (!animData)
|
||||
clearInterval(a);
|
||||
|
||||
if (!animData)
|
||||
return;
|
||||
let { id, name, animDict, animName, duration, loop, flag } = animData;
|
||||
|
||||
let { id, name, animDict, animName, duration, loop, flag } = animData;
|
||||
if (playAnim) {
|
||||
loadAnimDict(animDict, function () {
|
||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, -1, parseInt(flag), 0, !1, !1, !1)
|
||||
});
|
||||
playAnim = false;
|
||||
}
|
||||
|
||||
loadAnimDict(animDict, function () {
|
||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, -1, parseInt(flag), 0, !1, !1, !1)
|
||||
});
|
||||
let pair = pairData.find(pair => pair.from == string);
|
||||
if (!pair)
|
||||
clearInterval(a);
|
||||
|
||||
let pair = pairData.find(pair => pair.from == name);
|
||||
if (!pair && duration < 0)
|
||||
return;
|
||||
|
||||
let c = setInterval(function () {
|
||||
string = pair.transitionTo;
|
||||
entity.clearTasksImmediately();
|
||||
}, duration);
|
||||
let b = setInterval(function () {
|
||||
string = pair.transitionTo;
|
||||
mp.gui.chat.push("transition to " + string);
|
||||
playAnim = true;
|
||||
entity.clearTasksImmediately();
|
||||
clearInterval(b);
|
||||
}, duration);
|
||||
}, 200);
|
||||
});
|
||||
|
||||
function loadAnimDict(animDict, callback) {
|
||||
|
||||
Reference in New Issue
Block a user