projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b42adf8
)
Climbing animation stops when Tux is not in motion
author
LMH
<lmh.0013@gmail.com>
Thu, 11 Jul 2013 00:56:14 +0000
(14:56 -1000)
committer
LMH
<lmh.0013@gmail.com>
Thu, 11 Jul 2013 00:56:14 +0000
(14:56 -1000)
src/object/player.cpp
patch
|
blob
|
history
diff --git
a/src/object/player.cpp
b/src/object/player.cpp
index
fbb89fa
..
d1e42d8
100644
(file)
--- 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