- Sector::current()->add_object(
- new Particles(Vector(get_bbox().p2.x - j*8 - 4, get_bbox().p2.y),
- 0, 90+10*j, Vector(140, -260), Vector(0, 300),
- 1, Color(.6f, .6f, .6f), 4, 1.6f, LAYER_OBJECTS+1));
- Sector::current()->add_object(
- new Particles(Vector(get_bbox().p1.x + j*8 + 4, get_bbox().p2.y),
- 270+10*j, 360, Vector(140, -260), Vector(0, 300),
- 1, Color(.6f, .6f, .6f), 4, 1.6f, LAYER_OBJECTS+1));
+ Sector::current()->add_object(std::make_shared<Particles>(
+ Vector(get_bbox().p2.x - j*8 - 4, get_bbox().p2.y),
+ 0, 90+10*j, 140, 260, Vector(0, 300),
+ 1, Color(.6f, .6f, .6f), 4, 1.6f, LAYER_OBJECTS+1));
+ Sector::current()->add_object(std::make_shared<Particles>(
+ Vector(get_bbox().p1.x + j*8 + 4, get_bbox().p2.y),
+ 270+10*j, 360, 140, 260, Vector(0, 300),
+ 1, Color(.6f, .6f, .6f), 4, 1.6f, LAYER_OBJECTS+1));