projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acd2882
)
Tux can stop to backflip when landing on objects. Holding jump still continues backfl...
author
Wolfgang Becker
<uafr@gmx.de>
Thu, 29 Aug 2013 16:28:09 +0000
(18:28 +0200)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Sat, 26 Oct 2013 16:45:19 +0000
(18:45 +0200)
src/object/player.cpp
patch
|
blob
|
history
diff --git
a/src/object/player.cpp
b/src/object/player.cpp
index
427c653
..
11dd4d9
100644
(file)
--- a/
src/object/player.cpp
+++ b/
src/object/player.cpp
@@
-1253,6
+1253,12
@@
Player::collision(GameObject& other, const CollisionHit& hit)
return FORCE_MOVE;
}
+ if( backflipping && hit.bottom && ( !controller->hold(Controller::JUMP) ) ){
+ // allow to stop backflipping when landing on objects
+ backflipping = false;
+ backflip_direction = 0;
+ }
+
BadGuy* badguy = dynamic_cast<BadGuy*> (&other);
if(badguy != NULL) {
if(safe_timer.started() || invincible_timer.started())