diff options
author | BoredGuy <osome3717@gmail.com> | 2025-08-23 09:26:24 +0300 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2025-08-23 09:26:24 +0300 |
commit | 978c543891af8dbe9e95b27c4e2c46645d45138c (patch) | |
tree | 3bbf8b3397ab50929a442be67cf334ffdcf0e3ef /src/game.c | |
parent | 0f25d9fb178e9fb32793331aa1ed724d9747702d (diff) |
Animation system bugfix and player refactor
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |