create lisp code on the fly (still no enemies showing up in editor, no idea why....
[supertux.git] / src / badguy / bomb.cpp
index c7445a2..9495abc 100644 (file)
@@ -44,7 +44,8 @@ Bomb::collision_player(Player& player, const CollisionHit& )
 HitResponse
 Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& )
 {
-  badguy.kill_fall();
+  if(state == 1)
+    badguy.kill_fall();
   return ABORT_MOVE;
 }
 
@@ -56,6 +57,8 @@ Bomb::active_action(float )
       if(timer.check()) {
         state = 1;
         sprite->set_action("explosion");
+        SoundManager::get()->play_sound(IDToSound(SND_EXPLODE), get_pos(),
+            Sector::current()->player->get_pos());
         timer.start(EXPLOSIONTIME);
       }
       break;
@@ -71,3 +74,4 @@ void
 Bomb::kill_fall()
 {
 }
+