Tweaked the buttstomp range - now it kills only enemies that are close to Tux on...
[supertux.git] / src / player.cpp
index b3ecd98..9366cd5 100644 (file)
@@ -496,7 +496,7 @@ Player::handle_vertical_input()
 
    /* In case the player has pressed Down while in a certain range of air,
       enable butt jump action */
-  if (input.down == DOWN && !butt_jump)
+  if (input.down == DOWN && !butt_jump && !duck)
     if(tiles_on_air(TILES_FOR_BUTTJUMP) && jumping)
       butt_jump = true;
 
@@ -528,8 +528,9 @@ Player::handle_vertical_input()
       BadGuy* badguy = dynamic_cast<BadGuy*> (*i);
       if(badguy)
       {
-        if (fabsf(base.x - badguy->base.x) < 300 &&
-            fabsf(base.y - badguy->base.y) < 300 &&
+        
+       if (fabsf(base.x - badguy->base.x) < 150 &&
+            fabsf(base.y - badguy->base.y) < 60 &&
             (issolid(badguy->base.x + 1, badguy->base.y + badguy->base.height) ||
               issolid(badguy->base.x + badguy->base.width - 1, badguy->base.y + badguy->base.height)))
           badguy->kill_me(25);