Replaced Ref and RefCounter with std::shared_ptr<>
[supertux.git] / src / badguy / poisonivy.cpp
index c8973af..799d040 100644 (file)
@@ -54,7 +54,11 @@ PoisonIvy::collision_squished(GameObject& object)
     float vy = -cos(angle)*velocity;
     Vector pspeed = Vector(vx, vy);
     Vector paccel = Vector(0, 100);
-    Sector::current()->add_object(new SpriteParticle("images/objects/particles/poisonivy.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_OBJECTS-1));
+    Sector::current()->add_object(std::make_shared<SpriteParticle>("images/objects/particles/poisonivy.sprite",
+                                                                   "default",
+                                                                   ppos, ANCHOR_MIDDLE,
+                                                                   pspeed, paccel,
+                                                                   LAYER_OBJECTS-1));
   }
   kill_squished(object);
   return true;