projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tux can stop to backflip at will. Holding jump continues backflipping. Better fix...
[supertux.git]
/
src
/
object
/
player.cpp
diff --git
a/src/object/player.cpp
b/src/object/player.cpp
index
11dd4d9
..
61b6bc1
100644
(file)
--- a/
src/object/player.cpp
+++ b/
src/object/player.cpp
@@
-829,6
+829,12
@@
Player::handle_input()
log_debug << "Non MovingObject grabbed?!?" << std::endl;
}
}
log_debug << "Non MovingObject grabbed?!?" << std::endl;
}
}
+
+ /* stop backflipping at will */
+ if( backflipping && ( !controller->hold(Controller::JUMP) ) ){
+ backflipping = false;
+ backflip_direction = 0;
+ }
}
void
}
void
@@
-1253,12
+1259,6
@@
Player::collision(GameObject& other, const CollisionHit& hit)
return FORCE_MOVE;
}
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())
BadGuy* badguy = dynamic_cast<BadGuy*> (&other);
if(badguy != NULL) {
if(safe_timer.started() || invincible_timer.started())