try
This commit is contained in:
@@ -71,6 +71,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
playAnim(entity, string);
|
||||||
|
});
|
||||||
|
|
||||||
|
async function playAnim(entity, string) {
|
||||||
while (true) {
|
while (true) {
|
||||||
let index = mp.game.joaat(string);
|
let index = mp.game.joaat(string);
|
||||||
let animData = animationSyncData.animations[index];
|
let animData = animationSyncData.animations[index];
|
||||||
@@ -83,7 +87,10 @@
|
|||||||
loadAnimDict(animDict, function () {
|
loadAnimDict(animDict, function () {
|
||||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, -1, parseInt(flag), 0, !1, !1, !1)
|
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, -1, parseInt(flag), 0, !1, !1, !1)
|
||||||
});
|
});
|
||||||
mp.game.wait(duration);
|
|
||||||
|
while (entity.isPlayingAnim(animDict, animName, 3)) {
|
||||||
|
await mp.game.waitAsync(0);
|
||||||
|
}
|
||||||
|
|
||||||
let pair = pairData.find(pair => pair.from == name);
|
let pair = pairData.find(pair => pair.from == name);
|
||||||
if (!pair)
|
if (!pair)
|
||||||
@@ -92,7 +99,7 @@
|
|||||||
string = pair.transitionTo;
|
string = pair.transitionTo;
|
||||||
mp.gui.chat.push("transition to " + string);
|
mp.gui.chat.push("transition to " + string);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
function loadAnimDict(animDict, callback) {
|
function loadAnimDict(animDict, callback) {
|
||||||
if (mp.game.streaming.hasAnimDictLoaded(animDict)) return void callback();
|
if (mp.game.streaming.hasAnimDictLoaded(animDict)) return void callback();
|
||||||
|
|||||||
Reference in New Issue
Block a user