when flapping, Tux' x-velocity decreases slowly now
[supertux.git] / src / badguy.cpp
index 65133b3..1d9d197 100644 (file)
@@ -34,6 +34,7 @@
 #include "level.h"
 #include "sector.h"
 #include "tilemap.h"
+#include "statistics.h"
 
 Sprite* img_mriceblock_flat_left;
 Sprite* img_mriceblock_flat_right;
@@ -1070,6 +1071,7 @@ BadGuy::squish(Player* player)
     Sector::current()->add_score(Vector(base.x, base.y),
                                 25 * player_status.score_multiplier);
     SoundManager::get()->play_sound(IDToSound(SND_SQUISH), get_pos(), Sector::current()->player->get_pos());
+
     player_status.score_multiplier++;
     return;
 
@@ -1121,6 +1123,7 @@ BadGuy::squish(Player* player)
              
     Sector::current()->add_score(Vector(base.x, base.y),
                                 25 * player_status.score_multiplier);
+
     player_status.score_multiplier++;
      
     // simply remove the fish...
@@ -1156,7 +1159,7 @@ BadGuy::squish(Player* player)
 
       player->bounce(this);
       base.y += 66 - base.height;
-             
+
       Sector::current()->add_score(Vector(base.x, base.y),
                                 25 * player_status.score_multiplier);
       player_status.score_multiplier++;
@@ -1174,6 +1177,9 @@ BadGuy::kill_me(int score)
   if(kind == BAD_BOMB)
     return;
 
+  if(mode != HELD)
+    global_stats.add_points(BADGUYS_KILLED_STAT, 1);
+
   dying = DYING_FALLING;
   if(kind == BAD_MRICEBLOCK) {
     set_sprite(img_mriceblock_falling_left, img_mriceblock_falling_right);