Just improved a bit the butt jump control.
authorRicardo Cruz <rick2@aeiou.pt>
Wed, 19 May 2004 13:46:45 +0000 (13:46 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Wed, 19 May 2004 13:46:45 +0000 (13:46 +0000)
You don't have to press Down while pressing Up, but still you've to press it right away...

SVN-Revision: 1271

src/player.cpp

index 036cb69..625805b 100644 (file)
@@ -421,10 +421,10 @@ Player::handle_vertical_input()
 
    /* Do butt jump, in case the player has done the combination
         (full jump and hold DOWN) */
-  if (input.down == UP && physic.get_velocity_y() < 0 && butt_jump)
+  if (input.down == UP && physic.get_velocity_y() == World::current()->get_level()->gravity && butt_jump)
     butt_jump = false;  // in case DOWN is not hold after the full jump, disable it
   
-  if (butt_jump && on_ground() && size == BIG)
+  if (input.down == DOWN && butt_jump && on_ground() && size == BIG)
   {
     if(World::current()->trybreakbrick(base.x, base.y + base.height, false)
       || World::current()->trybreakbrick(