diff options
| author | cursed22bc <admin@pixeldawn.org> | 2026-03-02 23:16:16 +0200 |
|---|---|---|
| committer | cursed22bc <admin@pixeldawn.org> | 2026-03-02 23:16:16 +0200 |
| commit | 8514ffe0a1aa2febe989b2ff0b3044150492a1b2 (patch) | |
| tree | 941c85f21ddda4e8acbd800c25ebf6a9013f0c5f /world.lua | |
| parent | 255f32f77df817a8059839b4dae1afca20784888 (diff) | |
trying to debug stuttering
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 |
