diff --git a/sonic-radiance.love/core/modules/world/world3D.lua b/sonic-radiance.love/core/modules/world/world3D.lua index 58b364c..555f4a9 100644 --- a/sonic-radiance.love/core/modules/world/world3D.lua +++ b/sonic-radiance.love/core/modules/world/world3D.lua @@ -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