summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-08-23 09:26:24 +0300
committerBoredGuy <osome3717@gmail.com>2025-08-23 09:26:24 +0300
commit978c543891af8dbe9e95b27c4e2c46645d45138c (patch)
tree3bbf8b3397ab50929a442be67cf334ffdcf0e3ef /src/game.c
parent0f25d9fb178e9fb32793331aa1ed724d9747702d (diff)
Animation system bugfix and player refactor
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c4
1 files changed, 3 insertions, 1 deletions
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;