SoundManager::current()->preload("sounds/skid.wav");
SoundManager::current()->preload("sounds/flip.wav");
SoundManager::current()->preload("sounds/invincible_start.ogg");
- SoundManager::current()->preload("sounds/splash.ogg");
+ SoundManager::current()->preload("sounds/splash.wav");
init();
}
backflipping = false;
backflip_direction = 0;
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
visible = true;
ability_time = 0;
stone = false;
backflipping = false;
backflip_direction = 0;
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
GameSession::current()->start_sequence(sequence_name);
}
if (backflip_timer.started()) physic.set_velocity_x(100 * backflip_direction);
//rotate sprite during flip
sprite->set_angle(sprite->get_angle() + (dir==LEFT?1:-1) * elapsed_time * (360.0f / 0.5f));
+ if (player_status->bonus == EARTH_BONUS || player_status->bonus == AIR_BONUS) {
+ powersprite->set_angle(sprite->get_angle());
+ if (player_status->bonus == EARTH_BONUS)
+ lightsprite->set_angle(sprite->get_angle());
+ }
}
// set fall mode...
if (backflipping && (backflip_timer.get_timegone() > 0.15f)) {
backflipping = false;
backflip_direction = 0;
- sprite->set_angle(0.0f);
+ if (!stone) {
+ sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
+ }
// if controls are currently deactivated, we take care of standing up ourselves
if (deactivated)
return;
if (backflipping)
return;
+ if (stone)
+ return;
if (adjust_height(BIG_TUX_HEIGHT)) {
duck = false;
if (controller->pressed(Controller::DOWN) && player_status->bonus == EARTH_BONUS && !cooldown_timer.started()) {
if (controller->hold(Controller::ACTION) && !ability_timer.started()) {
ability_timer.start(player_status->max_earth_time * STONE_TIME_PER_FLOWER);
+ powersprite->stop_animation();
stone = true;
physic.set_gravity_modifier(1.0f); // Undo jump_early_apex
}
if (stone && (!controller->hold(Controller::ACTION) || ability_timer.get_timeleft() <= 0.5f)) {
cooldown_timer.start(ability_timer.get_timegone()/2.0f); //The longer stone form is used, the longer until it can be used again
ability_timer.stop();
+ sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
stone = false;
for (int i = 0; i < 8; i++)
{
backflipping = false;
backflip_direction = 0;
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
}
}
// make sure the Portable is a MovingObject
MovingObject* moving_object = dynamic_cast<MovingObject*> (portable);
assert(moving_object);
- if(moving_object == NULL)
- continue;
// make sure the Portable isn't currently non-solid
if(moving_object->get_group() == COLGROUP_DISABLED) continue;
// ignore GROWUP_BONUS if we're already big
if (type == GROWUP_BONUS) {
- if (!player_status->bonus == NO_BONUS)
+ if (player_status->bonus != NO_BONUS)
return true;
}
if( tile_attributes & Tile::WATER ){
swimming = true;
no_water = false;
- SoundManager::current()->play( "sounds/splash.ogg" );
+ SoundManager::current()->play( "sounds/splash.wav" );
}
}
#endif
physic.set_velocity_x(0);
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
if(!completely && is_big()) {
SoundManager::current()->play("sounds/hurt.wav");
duck = false;
backflipping = false;
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
set_bonus(NO_BONUS, true);
} else if(player_status->bonus == NO_BONUS) {
safe_timer.start(TUX_SAFE_TIME);
duck = false;
backflipping = false;
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
last_ground_y = vector.y;
if (climbing) stop_climbing(*climbing);
backflipping = false;
backflip_direction = 0;
sprite->set_angle(0.0f);
+ powersprite->set_angle(0.0f);
+ lightsprite->set_angle(0.0f);
}
}