diff options
Diffstat (limited to 'world.lua')
| -rw-r--r-- | world.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -303,8 +303,8 @@ function World.drawPhysicsBodyOutlines(entityList) local body = e.body if body and e.physicsWidth and e.physicsHeight then local cx, cy = body:getX(), body:getY() - local x = cx - e.physicsWidth / 2 - local y = cy - e.physicsHeight / 2 + local x = math.floor(cx - e.physicsWidth / 2) + local y = math.floor(cy - e.physicsHeight / 2) love.graphics.rectangle("line", x, y, e.physicsWidth, e.physicsHeight) end end @@ -316,7 +316,7 @@ function World.drawEntityDefault(entity) if entity.isPlayer then love.graphics.setColor(1, 0.3, 0.2, 1) end - love.graphics.rectangle("fill", entity.x, entity.y, entity.width, entity.height) + love.graphics.rectangle("fill", math.floor(entity.x), math.floor(entity.y), entity.width, entity.height) love.graphics.setColor(1, 1, 1, 1) end |
