From 5af76d1c358bfcf51db3e5ab413b2a52ad171e86 Mon Sep 17 00:00:00 2001 From: florianf Date: Fri, 5 Mar 2010 16:09:15 +0000 Subject: [PATCH] badguy.cpp: Badguys don't squish other badguys. They still turn around when walking into one another, but Bouncy, Jumpy and friends no longer squish their coworkers. Badguys that madly wish to be squished by other badguys, should check if they were hit from above in "collision_badguy" which is now called instead. Some exception *might* be necessary for stalactites. git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6554 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/badguy/badguy.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index 5ee5b9909..b5d895f35 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -240,12 +240,15 @@ BadGuy::collision(GameObject& other, const CollisionHit& hit) BadGuy* badguy = dynamic_cast (&other); if(badguy && badguy->is_active() && badguy->get_group() == COLGROUP_MOVING) { + /* Badguys don't let badguys squish other badguys. It's bad. */ +#if 0 // hit from above? if (badguy->get_bbox().p2.y < (bbox.p1.y + 16)) { if(collision_squished(*badguy)) { return ABORT_MOVE; } } +#endif return collision_badguy(*badguy, hit); } -- 2.11.0