From 367be698527d2e375ae9f7ca1dd7e522f87ee64a Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Wed, 12 Sep 2018 08:03:28 +0200 Subject: [PATCH] Buggfix: Prevent clip switching on falling sprite - This was a forgotten effect when the falling was implemented on the player struct. --- src/player.c | 1 + src/sprite.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player.c b/src/player.c index 7495db5..5333ec6 100644 --- a/src/player.c +++ b/src/player.c @@ -702,5 +702,6 @@ void player_set_falling(Player *player) { mixer_play_effect(FALL0 + get_random(1)); + player->sprite->clip = CLIP16(0, 0); player->sprite->state = SPRITE_STATE_FALLING; } diff --git a/src/sprite.c b/src/sprite.c index 7d51041..a05de2d 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -123,7 +123,6 @@ sprite_update(Sprite *s, UpdateData *data) if (s->state == SPRITE_STATE_FALLING) { if (!timer_started(s->animationTimer)) { timer_start(s->animationTimer); - s->clip = CLIP16(0, 0); } else { if (timer_get_ticks(s->animationTimer) > 100) { timer_start(s->animationTimer);