Bombfish: Create the explosion at the bottom of the bombfish.
authorflorianf <florianf@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Mon, 8 Mar 2010 13:33:44 +0000 (13:33 +0000)
committerflorianf <florianf@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Mon, 8 Mar 2010 13:33:44 +0000 (13:33 +0000)
Otherwise Tux won't be hurt when the bombfish falls onto him.
Resolves: #593

git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6579 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/badguy/bombfish.cpp

index 58a15b2..6c5b52f 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "supertux/constants.hpp"
 #include "supertux/sector.hpp"
+#include "object/anchor_point.hpp"
 #include "object/player.hpp"
 #include "object/explosion.hpp"
 
@@ -119,7 +120,7 @@ BombFish::explode (void)
   if (!is_valid ())
     return;
 
-  Explosion *explosion = new Explosion (get_bbox ().get_middle ());
+  Explosion *explosion = new Explosion (get_anchor_pos (bbox, ANCHOR_BOTTOM));
 
   explosion->hurts (true);
   explosion->pushes (false);