X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fmrbomb.cpp;h=a5290489857d1824e09cd0ad7e756b46f68f2d98;hb=864c93e01ec366f730b3ebad08d5c52d6a9363b6;hp=5b63955992de8a062105de3f402d8c154c166281;hpb=e3bb6e46812f108f093e9ad0751a945c34b18cd3;p=supertux.git diff --git a/src/badguy/mrbomb.cpp b/src/badguy/mrbomb.cpp index 5b6395599..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" @@ -78,4 +98,13 @@ 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")