if a stalactite hits a Mr. Bomb, explode, instead of falling.
authorRicardo Cruz <rick2@aeiou.pt>
Sat, 8 May 2004 23:21:21 +0000 (23:21 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Sat, 8 May 2004 23:21:21 +0000 (23:21 +0000)
Do you agree with this behavior?

SVN-Revision: 1047

src/badguy.cpp

index 5e33158..f852730 100644 (file)
@@ -988,7 +988,16 @@ BadGuy::collision(void *p_c_object, int c_object, CollisionType type)
       /* Kill any badguys that get hit by stalactite */
       else if (kind == BAD_STALACTITE && dying == DYING_NOT)
       {
-        pbad_c->kill_me(50);
+        if (pbad_c->kind == BAD_MRBOMB)
+        {
+          // mrbomb transforms into a bomb now
+          World::current()->add_bad_guy(pbad_c->base.x, pbad_c->base.y,
+                                        BAD_BOMB);
+          pbad_c->remove_me();
+          return;
+        }
+        else
+          pbad_c->kill_me(50);
       }
 
       /* When enemies run into eachother, make them change directions */