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 /animation.lua | |
| parent | 255f32f77df817a8059839b4dae1afca20784888 (diff) | |
trying to debug stuttering
Diffstat (limited to 'animation.lua')
| -rw-r--r-- | animation.lua | 3 |
1 files changed, 1 insertions, 2 deletions
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 |
