From: LMH Date: Thu, 11 Jul 2013 00:56:14 +0000 (-1000) Subject: Climbing animation stops when Tux is not in motion X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4efb3b8e3c83b38e7375604e83dd612be569d4a4;p=supertux.git Climbing animation stops when Tux is not in motion --- diff --git a/src/object/player.cpp b/src/object/player.cpp index fbb89fa37..d1e42d8e4 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -435,6 +435,14 @@ Player::update(float elapsed_time) if (sprite->animation_done()) growing = false; } + // when climbing animate only while moving + if(climbing){ + if((physic.get_velocity_x()==0)&&(physic.get_velocity_y()==0)) + sprite->stop_animation(); + else + sprite->set_animation_loops(-1); + } + } bool