Buggfix: Prevent clip switching on falling sprite

- This was a forgotten effect when the falling was implemented on the
player struct.
This commit is contained in:
Linus Probert 2018-09-12 08:03:28 +02:00
parent 988b53a4fa
commit 367be69852
2 changed files with 1 additions and 1 deletions

View File

@ -702,5 +702,6 @@ void
player_set_falling(Player *player) player_set_falling(Player *player)
{ {
mixer_play_effect(FALL0 + get_random(1)); mixer_play_effect(FALL0 + get_random(1));
player->sprite->clip = CLIP16(0, 0);
player->sprite->state = SPRITE_STATE_FALLING; player->sprite->state = SPRITE_STATE_FALLING;
} }

View File

@ -123,7 +123,6 @@ sprite_update(Sprite *s, UpdateData *data)
if (s->state == SPRITE_STATE_FALLING) { if (s->state == SPRITE_STATE_FALLING) {
if (!timer_started(s->animationTimer)) { if (!timer_started(s->animationTimer)) {
timer_start(s->animationTimer); timer_start(s->animationTimer);
s->clip = CLIP16(0, 0);
} else { } else {
if (timer_get_ticks(s->animationTimer) > 100) { if (timer_get_ticks(s->animationTimer) > 100) {
timer_start(s->animationTimer); timer_start(s->animationTimer);