From: Ricardo Cruz Date: Sat, 17 Apr 2004 12:00:31 +0000 (+0000) Subject: Applied patch from Ryan: X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9bbcdebf3f4609e46374da312c36fe97c62b91f9;p=supertux.git Applied patch from Ryan: � This patch causes badguys to be killed when they run into an exploding bomb or get hit by stalactite (as suggested by Ricardo). � SVN-Revision: 540 --- diff --git a/src/badguy.cpp b/src/badguy.cpp index 4c30fe616..2f7940530 100644 --- a/src/badguy.cpp +++ b/src/badguy.cpp @@ -973,6 +973,27 @@ BadGuy::collision(void *p_c_object, int c_object, CollisionType type) pbad_c->kill_me(); kill_me(); } + + /* Kill badguys that run into exploding bomb */ + else if (kind == BAD_BOMB && dying == DYING_NOT) + { + if (pbad_c->kind == BAD_MRBOMB) + { + // FIXME: this is where other MrBombs *should* explode istead of dying + pbad_c->kill_me(); + } + else if (pbad_c->kind != BAD_BOMB) + { + pbad_c->kill_me(); + } + } + + /* Kill any badguys that get hit by stalactite */ + else if (kind == BAD_STALACTITE && dying == DYING_NOT) + { + pbad_c->kill_me(); + } + break; } }