X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fplayer.cpp;h=edd4b24b233fce7a1fc75c86b2f24e491da08e0e;hb=be7f9f65018ed21515d389e8bd50f6f1eb988375;hp=7f829722c3ba55597afb4a63252192909a790639;hpb=4d3df5a40dfea474da0f15d8f2c6c755738bb7f6;p=supertux.git diff --git a/src/player.cpp b/src/player.cpp index 7f829722c..edd4b24b2 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -95,12 +95,12 @@ feet->set_action(action); } void -TuxBodyParts::start_animation(int loops, std::string next_action) +TuxBodyParts::one_time_animation() { -head->start_animation(loops, next_action); -body->start_animation(loops, next_action); -arms->start_animation(loops, next_action); -feet->start_animation(loops, next_action); +head->start_animation(1); +body->start_animation(1); +arms->start_animation(1); +feet->start_animation(1); } void @@ -826,12 +826,12 @@ Player::draw(DrawingContext& context) if (dir == RIGHT) { tux_body->set_action("idle-right"); - tux_body->start_animation(1, "stand-right"); + tux_body->one_time_animation(); } else { tux_body->set_action("idle-left"); - tux_body->start_animation(1, "stand-left"); + tux_body->one_time_animation(); } idle_timer.start(IDLE_TIME); }