Replaced Ref and RefCounter with std::shared_ptr<>
[supertux.git] / src / object / wind.cpp
index ea5f3a3..db27bb4 100644 (file)
@@ -64,7 +64,7 @@ Wind::update(float elapsed_time_)
     // emit a particle
     Vector ppos = Vector(graphicsRandom.randf(bbox.p1.x+8, bbox.p2.x-8), graphicsRandom.randf(bbox.p1.y+8, bbox.p2.y-8));
     Vector pspeed = Vector(speed.x, speed.y);
-    Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.4f, .4f, .4f), 3, .1f,
+    Sector::current()->add_object(std::make_shared<Particles>(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.4f, .4f, .4f), 3, .1f,
                                                 LAYER_BACKGROUNDTILES+1));
   }
 }