fix: take the ennemy z into account for qte
This commit is contained in:
parent
fe5e1f6d68
commit
cc66f86bd1
1 changed files with 5 additions and 3 deletions
|
@ -28,25 +28,27 @@ function QteParent:endQte()
|
||||||
end
|
end
|
||||||
|
|
||||||
function QteParent:setOrigin(origin)
|
function QteParent:setOrigin(origin)
|
||||||
local x, y = 424/2, 240/2
|
local x, y, z = 424/2, 240/2, 0
|
||||||
local argy = 24
|
local argy = 16
|
||||||
local battleCoord = false
|
local battleCoord = false
|
||||||
if (origin == "target") then
|
if (origin == "target") then
|
||||||
local target = self.choregraphy.action.target
|
local target = self.choregraphy.action.target
|
||||||
x, y = target.actor:getCoordinate()
|
x, y = target.actor:getCoordinate()
|
||||||
|
z = target.actor.z
|
||||||
battleCoord = true
|
battleCoord = true
|
||||||
elseif (origin == "start") then
|
elseif (origin == "start") then
|
||||||
x, y = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y
|
x, y = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y
|
||||||
battleCoord = true
|
battleCoord = true
|
||||||
elseif (origin == "actor") then
|
elseif (origin == "actor") then
|
||||||
x, y = self.choregraphy.actor:getCoordinate()
|
x, y = self.choregraphy.actor:getCoordinate()
|
||||||
|
z = self.choregraphy.actor.z
|
||||||
battleCoord = true
|
battleCoord = true
|
||||||
end
|
end
|
||||||
if (not battleCoord) then
|
if (not battleCoord) then
|
||||||
self.x, self.y = x, y
|
self.x, self.y = x, y
|
||||||
else
|
else
|
||||||
x, y = self.choregraphy.world.map:gridToPixel(x, y, true)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue