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 --- animation.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'animation.lua') diff --git a/animation.lua b/animation.lua index 7d77d40..58cb356 100644 --- a/animation.lua +++ b/animation.lua @@ -44,7 +44,6 @@ function Animation:reset() self.currentTime = 0 end --- Returns true only for non-looping animations that have played through once. function Animation:isFinished() return self.looping == false and self.currentTime >= self.duration end @@ -62,7 +61,7 @@ function Animation:draw(x, y, flipHorizontal) local ox = flipHorizontal and self.frameWidth or 0 local oy = 0 - love.graphics.draw(self.spriteSheet, quad, x, y, 0, sx, sy, ox, oy) + love.graphics.draw(self.spriteSheet, quad, math.floor(x), math.floor(y), 0, sx, sy, ox, oy) end return Animation -- cgit v1.2.3