Tweak offsets a bit so kamikazesnowball doesn't die.
authormathnerd314 <mathnerd314@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Wed, 3 Mar 2010 08:18:04 +0000 (08:18 +0000)
committermathnerd314 <mathnerd314@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Wed, 3 Mar 2010 08:18:04 +0000 (08:18 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6530 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/badguy/dispenser.cpp

index 3249856..19ac634 100644 (file)
@@ -206,11 +206,11 @@ Dispenser::launch_badguy()
       Vector spawnpoint;
 
       if (type == "dropper")
-        spawnpoint = Vector(get_pos().x, get_pos().y+32);
+        spawnpoint = Vector(get_pos().x, get_pos().y+get_bbox().get_height()+8);
       else if (type == "cannon")
-        spawnpoint = Vector(get_pos().x + (launchdir == LEFT ? -32 : 32), get_pos().y);
+        spawnpoint = Vector(get_pos().x + (launchdir == LEFT ? -32 : get_bbox().get_width()+3), get_pos().y);
       else if (type == "rocketlauncher")
-        spawnpoint = Vector(get_pos().x + (launchdir == LEFT ? -32 : 32), get_pos().y);
+        spawnpoint = Vector(get_pos().x + (launchdir == LEFT ? -32 : get_bbox().get_width()+3), get_pos().y);
 
       badguy_object = ObjectFactory::instance().create(badguy, spawnpoint, launchdir);