X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fmrbomb.cpp;h=a5290489857d1824e09cd0ad7e756b46f68f2d98;hb=fc5dc4864949fc6945153bf2f172cb9c6a02e843;hp=215284299242581480207b63aeb8a09784722106;hpb=45d21c1c59a58aa557b62d3aa22ba89a975e323c;p=supertux.git diff --git a/src/badguy/mrbomb.cpp b/src/badguy/mrbomb.cpp index 215284299..a52904898 100644 --- a/src/badguy/mrbomb.cpp +++ b/src/badguy/mrbomb.cpp @@ -1,3 +1,23 @@ +// $Id$ +// +// SuperTux +// Copyright (C) 2005 Matthias Braun +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. + #include #include "mrbomb.h" @@ -77,3 +97,14 @@ MrBomb::collision_badguy(BadGuy& , const CollisionHit& hit) return CONTINUE; } + +void +MrBomb::kill_fall() +{ + remove_me(); + Bomb* bomb = new Bomb(get_pos(), dir); + Sector::current()->add_object(bomb); + bomb->explode(); +} + +IMPLEMENT_FACTORY(MrBomb, "mrbomb")