Use run_dead_script wherever possible and make kill_* operations only do stuff once
[supertux.git] / src / badguy / mrtree.cpp
index 3828225..a79350b 100644 (file)
@@ -90,6 +90,7 @@ MrTree::collision_squished(GameObject& object)
   if (Sector::current()->is_free_of_movingstatics(leaf1_bbox, this)) {
     PoisonIvy* leaf1 = new PoisonIvy(leaf1_bbox.p1, LEFT);
     leaf1 = leaf1;
+    leaf1->countMe = false;
     Sector::current()->add_object(leaf1);
   }
 
@@ -99,6 +100,7 @@ MrTree::collision_squished(GameObject& object)
   if (Sector::current()->is_free_of_movingstatics(leaf2_bbox, this)) {
     PoisonIvy* leaf2 = new PoisonIvy(leaf2_bbox.p1, RIGHT);
     leaf2 = leaf2;
+    leaf2->countMe = false;
     Sector::current()->add_object(leaf2);
   }