Skip to content

Commit

Permalink
Tux can stop to backflip when landing on objects. Holding jump still …
Browse files Browse the repository at this point in the history
…continues backflipping. Fixes bug #1008.
  • Loading branch information
uafr committed Aug 29, 2013
1 parent 87b8c05 commit db1f66a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/object/player.cpp
Expand Up @@ -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())
Expand Down

0 comments on commit db1f66a

Please sign in to comment.