fix: use the origin for ysorting tiles
This commit is contained in:
parent
dd4d212721
commit
040f67d32c
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ function TiledMultiMap:drawUpperLayers()
|
||||||
local pos1AUpperLayer = self:haveUpperLayerAtCoord(player.x, player.y + 8)
|
local pos1AUpperLayer = self:haveUpperLayerAtCoord(player.x, player.y + 8)
|
||||||
local pos2AUpperLayer = self:haveUpperLayerAtCoord(player.x + 16, 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
|
if (pos1AUpperLayer or pos2AUpperLayer) then
|
||||||
y = math.floor((player.y - player.z)/16)*16
|
y = math.floor((player.y - player.z)/16)*16
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue