currentsector->camera->reset(Vector(tux.base.x, tux.base.y));
last_keys.clear();
}
+ // temporary to help player's choosing a flapping
+ if(compare_last(last_keys, "marek"))
+ {
+ tux.flapping_mode = Player::MAREK_FLAP;
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "ricardo"))
+ {
+ tux.flapping_mode = Player::RICARDO_FLAP;
+ last_keys.clear();
+ }
+ if(compare_last(last_keys, "ryan"))
+ {
+ tux.flapping_mode = Player::RYAN_FLAP;
+ last_keys.clear();
+ }
break;
case SDL_JOYAXISMOTION:
butt_jump = false;
flapping_velocity = 0;
-
+
+ // temporary to help player's choosing a flapping
+ int flapping_mode = MAREK_FLAP;
+
+ // Ricardo's flapping
+ flaps_nb = 0;
+
frame_main = 0;
frame_ = 0;
flapping = false;
can_jump = false;
can_flap = false;
+ flaps_nb = 0; // Ricardo's flapping
if (size == SMALL)
SoundManager::get()->play_sound(IDToSound(SND_JUMP));
else
}
}
-
+ // temporary to help player's choosing a flapping
+ if(flapping_mode == RICARDO_FLAP)
+ {
+ // Flapping, Ricardo's version
+ // similar to SM3 Fox
+ if(input.jump == DOWN && input.old_jump == UP && can_flap &&
+ flaps_nb < 3)
+ {
+ physic.set_velocity_y(3.5);
+ physic.set_velocity_x(physic.get_velocity_x() * 0.35);
+ flaps_nb++;
+ }
+ }
+ else if(flapping_mode == MAREK_FLAP)
+ {
// Flapping, Marek's version
if (input.jump == DOWN && can_flap)
{
physic.set_velocity_y((float)flapping_timer.get_gone()/850);
}
}
-
- /* // Flapping, Ryan's version
+ }
+ else if(flapping_mode == RYAN_FLAP)
+ {
+ // Flapping, Ryan's version
if (input.jump == DOWN && can_flap)
{
if (!flapping_timer.started())
{
physic.set_acceleration_y(0);
}
- */
+ }
+
// Hover
//(disabled by default, use cheat code "hover" to toggle on/off)
float flapping_velocity;
+ // Ricardo's flapping
+ int flaps_nb;
+
+ // temporary to help player's choosing a flapping
+ enum { MAREK_FLAP, RICARDO_FLAP, RYAN_FLAP, NONE_FLAP };
+ int flapping_mode;
+
base_type previous_base;
Timer invincible_timer;
Timer skidding_timer;