fix: use the origin for ysorting tiles

This commit is contained in:
Kazhnuz 2021-04-21 21:17:34 +02:00
parent dd4d212721
commit 040f67d32c

View file

@ -150,7 +150,7 @@ function TiledMultiMap:drawUpperLayers()
local pos1AUpperLayer = self:haveUpperLayerAtCoord(player.x, player.y + 8)
local pos2AUpperLayer = self:haveUpperLayerAtCoord(player.x + 16, player.y + 8)
local y = math.floor((player.y)/16)*16
local y = math.floor((player.y + 8)/16)*16
if (pos1AUpperLayer or pos2AUpperLayer) then
y = math.floor((player.y - player.z)/16)*16
end