From: Ryan Flegel Date: Mon, 16 Jun 2008 04:01:21 +0000 (+0000) Subject: Fixes dying animation issue where it is stuck at frame 0. X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=231f818a34e68ffcb8c23774cb13b25fd9fb294c;p=supertux.git Fixes dying animation issue where it is stuck at frame 0. SVN-Revision: 5576 --- diff --git a/src/object/player.cpp b/src/object/player.cpp index 63770ef80..085ca7d82 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -943,7 +943,10 @@ Player::draw(DrawingContext& context) sa_prefix = "small"; /* Set Tux sprite action */ - if (growing) { + if(dying) { + sprite->set_action("gameover"); + } + else if (growing) { sprite->set_action_continued((dir == LEFT)?"grow-left":"grow-right"); // while growing, do not change action // do_duck() will take care of cancelling growing manually @@ -994,10 +997,6 @@ Player::draw(DrawingContext& context) } */ - if(dying) { - sprite->set_action("gameover"); - } - /* Draw Tux */ if (safe_timer.started() && size_t(game_time*40)%2) ; // don't draw Tux