summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
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;