fix: various fix for zSortItem
This commit is contained in:
parent
250d75ee77
commit
ea4f3a926c
1 changed files with 3 additions and 1 deletions
|
@ -202,6 +202,7 @@ function World3D:zSortItems(items)
|
|||
end
|
||||
|
||||
local _, aY, aZ, _, aH, aD = self.bodies:getCube(itemA.mainHitbox)
|
||||
local aDepth, aID, aType
|
||||
aDepth = itemA.depth
|
||||
aID = itemA.creationID
|
||||
aType = itemA.type
|
||||
|
@ -210,6 +211,7 @@ function World3D:zSortItems(items)
|
|||
|
||||
for _, itemB in ipairs(overlapping) do
|
||||
local _, bY, bZ, _, bH, bD = self.bodies:getCube(itemB.mainHitbox)
|
||||
local bDepth, bID, bType
|
||||
bDepth = itemB.depth
|
||||
bID = itemB.creationID
|
||||
bType = itemB.type
|
||||
|
@ -246,7 +248,7 @@ function World3D:zSortItems(items)
|
|||
elseif aID < bID then
|
||||
graph:add(itemB, itemA)
|
||||
else
|
||||
err("two object can't have the same ID")
|
||||
error("two object can't have the same ID")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue