From 8514ffe0a1aa2febe989b2ff0b3044150492a1b2 Mon Sep 17 00:00:00 2001 From: cursed22bc Date: Mon, 2 Mar 2026 23:16:16 +0200 Subject: trying to debug stuttering --- world.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'world.lua') diff --git a/world.lua b/world.lua index c7f2fe4..16324bb 100644 --- a/world.lua +++ b/world.lua @@ -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 -- cgit v1.2.3