From da3ab42f32ee7163316d8884d44347c3cd154c6d Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 25 Aug 2019 16:01:09 +0200 Subject: [PATCH] fix(cbs): fix an hiccup --- sonic-radiance.love/scenes/battlesystem/actors/hero.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/actors/hero.lua b/sonic-radiance.love/scenes/battlesystem/actors/hero.lua index cd52e19..13f100e 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 = math.min(self:getMovementDuration(dx, dy, duration), 0.30) + local duration = math.max(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 = math.min(self:getMovementDuration(dx, dy, duration), 0.30) + local duration = math.max(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)