Autolock lock( particleSetLock );
DPF(0, "Particle Draw Start");
+ // remove dead Particle*s from Active
+ for( setPart::iterator it = particles_To_Remove.begin();
+ it != particles_To_Remove.end();
+ it++ )
+ {
+ DPF(0, "Particle Delete");
+ active_Particles.erase(*it);
+ }
+ particles_To_Remove.clear();
+
// update active Particle*s
for( setPart::iterator it = active_Particles.begin();
it != active_Particles.end();
Autolock lock( physicsEntitySetLock );
DPF(0, "Physics Draw Start");
+ // remove dead PhysicsEntity*s from Active
+ for( setPhys::iterator it = physics_To_Remove.begin();
+ it != physics_To_Remove.end();
+ it++ )
+ {
+ DPF(0, "Physics Delete");
+ active_Physics.erase(*it);
+ }
+ physics_To_Remove.clear();
+
// update active PhysicsEntity*s
for( setPhys::iterator it = active_Physics.begin();
it != active_Physics.end();
DPF(0, "Particle Delete");
active_Particles.erase(*it);
}
+ particles_To_Remove.clear();
}
particles_To_Add.clear();
- particles_To_Remove.clear();
// update active Particle*s
for( setPart::iterator it = active_Particles.begin();
DPF(0, "Physics Delete");
active_Physics.erase(*it);
}
+ physics_To_Remove.clear();
}
- physics_To_Remove.clear();
physics_To_Add.clear();
// apply collision math