no_water = true;
if(dying && dying_timer.check()) {
+ set_bonus(NO_BONUS, true);
dead = true;
return;
}
// check if we landed
if(on_ground()) {
jumping = false;
- if (backflipping && (!backflip_timer.started())) {
+ if (backflipping && (backflip_timer.get_timegone() > 0.15f)) {
backflipping = false;
backflip_direction = 0;
backflipping = true;
do_jump(-580);
sound_manager->play("sounds/flip.wav");
- backflip_timer.start(0.15f);
+ backflip_timer.start(TUX_BACKFLIP_TIME);
}
void
log_debug << "Non MovingObject grabbed?!?" << std::endl;
}
}
+
+ /* stop backflipping at will */
+ if( backflipping && ( !controller->hold(Controller::JUMP) && !backflip_timer.started()) ){
+ backflipping = false;
+ backflip_direction = 0;
+ }
}
void
{
if((player_status->bonus == NO_BONUS) && (type != NO_BONUS)) {
if (!adjust_height(BIG_TUX_HEIGHT)) {
- printf("can't adjust\n");
+ log_debug << "Can't adjust Tux height" << std::endl;
return false;
}
if(animate) {