Do not resurrect squished bouncing snowball when colliding with badguy or tile
authorTobias Markus <tobbi@mozilla-uk.org>
Mon, 4 Nov 2013 20:15:27 +0000 (21:15 +0100)
committerTobias Markus <tobbi@mozilla-uk.org>
Mon, 4 Nov 2013 20:15:27 +0000 (21:15 +0100)
src/badguy/bouncing_snowball.cpp

index 64f49f7..67af264 100644 (file)
@@ -50,6 +50,11 @@ BouncingSnowball::collision_squished(GameObject& object)
 void
 BouncingSnowball::collision_solid(const CollisionHit& hit)
 {
+  if(sprite->get_action() == "squished")
+  {
+    return;
+  }
+
   if(hit.bottom) {
     if(get_state() == STATE_ACTIVE) {
       physic.set_velocity_y(JUMPSPEED);