fix: 勇士在高倍速录像播放后会瞬移一步

This commit is contained in:
AncTe committed 2024-11-22 22:42:59 +08:00
1 parent 58e6b4be83
commit 67a9eaa4d5
3 files changed
+9 -4

No files matched your search

+6 -3
View File
@@ -111,7 +111,8 @@ export class HeroRenderer
autotile: false,
bigImage: true,
render: this.getRenderFromDir(this.showDir),
animate: 0
animate: 0,
alpha: 1
};
}
@@ -247,6 +248,7 @@ export class HeroRenderer
*/
readyMove() {
this.moving = true;
this.fixMoveSpeed();
}
/**
@@ -261,8 +263,9 @@ export class HeroRenderer
}
this.moveDir = dir;
if (this.moveDetached) return this.moveDetached;
else {
if (this.moveDetached) {
return this.moveDetached;
} else {
this.step();
this.moveDetached = new Promise(res => {
this.once('stepEnd', () => {
+2
View File
@@ -646,6 +646,8 @@ export class HeroMover extends ObjectMoverBase {
if (x === 0) core.setHeroLoc('x', map.width - 1);
else core.setHeroLoc('x', 0);
} else {
// console.trace();
core.setHeroLoc('x', nx, true);
core.setHeroLoc('y', ny, true);
}