void
Player::handle_vertical_input()
{
- if(input.up == DOWN)
+ if(input.up == DOWN && input.old_up == UP)
{
if (on_ground())
{
{
handle_vertical_input();
}
+ input.old_up = input.up;
/* Shoot! */
duck = false;
base.y -= 32;
base.height = 64;
+ // changing base size confuses collision otherwise
+ old_base = previous_base = base;
}
}
size = BIG;
base.height = 64;
base.y -= 32;
- // eventually go in duck mode if there's no space
- if(collision_object_map(base))
- {
- base.height = 32;
- base.y += 32;
- duck = true;
- }
old_base = previous_base = base;
}