From 737d0e5a691d6c6d872faff9fa4003f636ae6a6e Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 25 Aug 2019 16:00:21 +0200 Subject: [PATCH] fix(cbs): add a minimal duration to moving --- sonic-radiance.love/scenes/battlesystem/actors/hero.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua index be3f31d..cd52e19 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua @@ -126,7 +126,7 @@ function Hero:getMovementDuration(dx, dy, duration) end function Hero:goTo(dx, dy, timerName, duration) - local duration = self:getMovementDuration(dx, dy, duration) + local duration = math.min(self:getMovementDuration(dx, dy, duration), 0.30) if duration > 0 then self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad') end @@ -134,7 +134,7 @@ function Hero:goTo(dx, dy, timerName, duration) end function Hero:jumpTo(dx, dy, size, timerName, spinjump, duration) - local duration = self:getMovementDuration(dx, dy, duration) + local duration = math.min(self:getMovementDuration(dx, dy, duration), 0.30) self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad') self.tweens:newTimer(duration + 0.02, timerName) self:setJump(size, spinjump, duration) @@ -414,7 +414,7 @@ function Hero:chorJump(args) xx, yy = self.choregraphy.dx, self.choregraphy.dy end - self:jumpTo(xx, yy, 32, "action_jumpBack", false) + self:jumpTo(xx, yy, 48, "action_jumpBack", false) self:blockChoregraphy(args.blockProcess, "action_jumpBack") end