From 978c543891af8dbe9e95b27c4e2c46645d45138c Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Sat, 23 Aug 2025 09:26:24 +0300 Subject: Animation system bugfix and player refactor --- src/game.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index b15c85f..4a10830 100644 --- a/src/game.c +++ b/src/game.c @@ -183,8 +183,10 @@ void UpdateCurrentSpriteAnimation(Sprite* sprite, float dt) { } if (currentAnimation->currentFrame >= currentAnimation->numFrames) { - if (currentAnimation->isLooping) + if (currentAnimation->isLooping) { currentAnimation->currentFrame = 0; + currentAnimation->currentFrameTimer = 0.0f; + } else { currentAnimation->currentFrame = currentAnimation->numFrames - 1; currentAnimation->isComplete = true; -- cgit v1.2.3