Don't resurrect zeekling when colliding after squished
authorTobias Markus <tobbi@mozilla-uk.org>
Tue, 5 Nov 2013 17:34:10 +0000 (18:34 +0100)
committerTobias Markus <tobbi@mozilla-uk.org>
Tue, 5 Nov 2013 17:34:10 +0000 (18:34 +0100)
src/badguy/zeekling.cpp

index 1c49add..8fff3ea 100644 (file)
@@ -109,6 +109,12 @@ Zeekling::onBumpVertical() {
 void
 Zeekling::collision_solid(const CollisionHit& hit)
 {
+  if(sprite->get_action() == "squished-left" ||
+     sprite->get_action() == "squished-right")
+  {
+    return;
+  }
+
   if(hit.top || hit.bottom) {
     onBumpVertical();
   } else if(hit.left || hit.right) {