diff --git a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua index 76b5799..7ce98dc 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua @@ -252,9 +252,14 @@ function Hero:receiveSignal(action_type, id) self.world.cursor:unset( ) self:useSkill(id, self.world.cursor.x, self.world.cursor.y) elseif (action_type == "cursorMove") then - self:changeAnimation("walk", true) - self:goTo(self.world.cursor.x, self.world.cursor.y, 'cursorMove', 1) - self.assets.sfx["woosh"]:play() + if (self.x ~= self.world.cursor.x) or (self.y ~= self.world.cursor.y) then + self:changeAnimation("walk", true) + self:goTo(self.world.cursor.x, self.world.cursor.y, 'cursorMove', 1) + self.assets.sfx["woosh"]:play() + else + self.world:resetActiveGrid() + self.scene.menu:set( self ) + end self.world.cursor:unset( ) else self:switchActiveBattler( ) @@ -263,10 +268,11 @@ end function Hero:receiveBackSignal() self.world.cursor:set(self.x, self.y, "cursorMove") - self:goTo(self.startx, self.starty, 'backMove', 1) - self.assets.sfx["woosh"]:play() - - self:changeAnimation("walk") + if (self.x ~= self.startx) or (self.y ~= self.starty) then + self.world.cursor:set(self.x, self.y, "cursorMove") + self.assets.sfx["woosh"]:play() + self:changeAnimation("walk") + end end function Hero:timerResponse(timer)