From cc66f86bd1596f1f53f21528549f2b0e0c406fda Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 9 May 2021 15:06:29 +0200 Subject: [PATCH] fix: take the ennemy z into account for qte --- .../fighters/systems/choregraphy/qte/parent.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/qte/parent.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/qte/parent.lua index b8f003d..806470c 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/qte/parent.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/qte/parent.lua @@ -28,25 +28,27 @@ function QteParent:endQte() end function QteParent:setOrigin(origin) - local x, y = 424/2, 240/2 - local argy = 24 + local x, y, z = 424/2, 240/2, 0 + local argy = 16 local battleCoord = false if (origin == "target") then local target = self.choregraphy.action.target x, y = target.actor:getCoordinate() + z = target.actor.z battleCoord = true elseif (origin == "start") then x, y = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y battleCoord = true elseif (origin == "actor") then x, y = self.choregraphy.actor:getCoordinate() + z = self.choregraphy.actor.z battleCoord = true end if (not battleCoord) then self.x, self.y = x, y else x, y = self.choregraphy.world.map:gridToPixel(x, y, true) - self.x, self.y = x, y - argy + self.x, self.y = x, y - argy - z end end