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

This commit is contained in:
unanmed 2024-11-22 22:42:59 +08:00
parent 58e6b4be83
commit 67a9eaa4d5
3 changed files with 9 additions and 4 deletions

View File

@ -2825,7 +2825,7 @@ control.prototype.checkRouteFolding = function () {
if (core.status.routeFolding[v].length >= one.length)
delete core.status.routeFolding[v];
});
core.status.route = core.status.route.slice(0, one.length);
core.status.route.splice(one.length);
this._bindRoutePush();
}
}

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', () => {

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);
}