Skip to content

Commit

Permalink
Tux can stop to backflip at will. Holding jump continues backflipping…
Browse files Browse the repository at this point in the history
…. Better fix for bug #1008.
  • Loading branch information
uafr authored and tobbi committed Oct 26, 2013
1 parent b9c8dca commit c25d089
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/object/player.cpp
Expand Up @@ -829,6 +829,12 @@ Player::handle_input()
log_debug << "Non MovingObject grabbed?!?" << std::endl;
}
}

/* stop backflipping at will */
if( backflipping && ( !controller->hold(Controller::JUMP) ) ){
backflipping = false;
backflip_direction = 0;
}
}

void
Expand Down Expand Up @@ -1253,12 +1259,6 @@ 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 c25d089

Please sign in to comment.