diff --git a/data/scripts/collision.lua b/data/scripts/collision.lua index 1adbc9d..d925bdf 100644 --- a/data/scripts/collision.lua +++ b/data/scripts/collision.lua @@ -73,4 +73,6 @@ function Collision:Draw(color) love.graphics.setColor(0,1,1,0.5) end love.graphics.rectangle("fill",self.from.x-Camera.pos.x, self.from.y-Camera.pos.y, self.width, self.height) + love.graphics.setColor(0,1,90,0.5) + love.graphics.rectangle("line",self.from.x-Camera.pos.x, self.from.y-Camera.pos.y, self.width, self.height) end diff --git a/data/scripts/level.lua b/data/scripts/level.lua index d3f23c5..a17e577 100644 --- a/data/scripts/level.lua +++ b/data/scripts/level.lua @@ -299,7 +299,11 @@ function TileOptimizeObjects() and not isTileOptimized[i+m][j+n] then checkline = true + else + break end + else + break end end if checkline then @@ -308,6 +312,8 @@ function TileOptimizeObjects() isTileOptimized[i+m][j+l] = true end m = m + 1 + else + check = false end end