added cheat code "hover" to toggle hovering on/off
SVN-Revision: 1924
tux.kill(tux.KILL);
last_keys.clear();
}
+ if(compare_last(last_keys, "hover"))
+ { // toggle hover ability on/off
+ tux.enable_hover = !tux.enable_hover;
+ last_keys.clear();
+ }
break;
case SDL_JOYAXISMOTION:
double_jumping = false;
can_jump = true;
can_double_jump = false;
+ enable_hover = false;
butt_jump = false;
frame_main = 0;
}
// Hover
- if (input.up == DOWN && !jumping && !butt_jump && physic.get_velocity_y() <= 0)
+ //(disabled by default, use cheat code "hover" to toggle on/off)
+ //TODO: needs some tweaking, especially when used together with double jump and jumping off badguys
+ if (enable_hover && input.up == DOWN && !jumping && !butt_jump && physic.get_velocity_y() <= 0)
{
physic.set_velocity_y(-1);
}
bool double_jumping;
bool can_jump;
bool can_double_jump;
+ bool enable_hover;
bool butt_jump;
int frame_;
int frame_main;