From 4c77ce6ec87c0415cfd40a3fd63b382f3f96d3d7 Mon Sep 17 00:00:00 2001 From: Aaron Landwehr Date: Fri, 19 Aug 2022 15:33:35 -0400 Subject: [PATCH] Fix 1 cycle delay in processing of move commands that causes a visible stutter when the player is moving via set movement route. --- movement/js/plugins/AltimitMovement.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/movement/js/plugins/AltimitMovement.js b/movement/js/plugins/AltimitMovement.js index fb2def3..9e04a74 100644 --- a/movement/js/plugins/AltimitMovement.js +++ b/movement/js/plugins/AltimitMovement.js @@ -798,8 +798,7 @@ */ ( function() { - var Game_CharacterBase_update = Game_CharacterBase.prototype.update; - Game_CharacterBase.prototype.update = function() { + Game_CharacterBase.prototype.continueProcessMoveCommand = function() { if ( this._moveTarget ) { var dx = $gameMap.directionX( this._x, this._moveTargetX ); var dy = $gameMap.directionY( this._y, this._moveTargetY ); @@ -823,8 +822,6 @@ } } } - - Game_CharacterBase_update.call( this ); }; Game_CharacterBase.prototype.isOnLadder = function() { @@ -1232,6 +1229,7 @@ Game_Character.prototype.updateRoutineMove = function() { if ( this._moveTarget ) { + this.continueProcessMoveCommand(); var moveRoute = this._moveRoute; if ( !moveRoute.skippable || this._wasMoving ) { return; @@ -1244,6 +1242,7 @@ var command = this._moveRoute.list[this._moveRouteIndex]; if ( command ) { this.processMoveCommand( command ); + this.continueProcessMoveCommand(); this.advanceMoveRouteIndex(); } }