Skip to content

Commit

Permalink
[FIX] Try fix battler move not always correct on final position
Browse files Browse the repository at this point in the history
  • Loading branch information
Wano-k committed Sep 29, 2023
1 parent ea8a5a8 commit 7d9fc91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/Battler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,11 @@ class Battler {
let time = new Date().getTime() - this.timerMove;
if (time <= Battler.TIME_MOVE) {
this.moving = true;
newX = progression.getProgressionAt(time, Battler.TIME_MOVE, true);
} else {
this.moving = false;
time = Battler.TIME_MOVE;
}
newX = progression.getProgressionAt(time, Battler.TIME_MOVE, true);
if (this.mesh.position.x !== newX) {
this.mesh.position.setX(newX);
this.upPosition.setX(newX);
Expand Down

0 comments on commit 7d9fc91

Please sign in to comment.