mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 16:02:08 +02:00
don't hang loop if entity isDead
This commit is contained in:
parent
1972b140b9
commit
e1e51614d9
1 changed files with 1 additions and 0 deletions
|
@ -208,6 +208,7 @@ void PhysicalEntitySimulation::getObjectsToAddToPhysics(VectorOfMotionStates& re
|
|||
assert(!entity->getPhysicsInfo());
|
||||
if (entity->isDead()) {
|
||||
prepareEntityForDelete(entity);
|
||||
entityItr = _entitiesToAddToPhysics.erase(entityItr);
|
||||
} else if (!entity->shouldBePhysical()) {
|
||||
// this entity should no longer be on the internal _entitiesToAddToPhysics
|
||||
entityItr = _entitiesToAddToPhysics.erase(entityItr);
|
||||
|
|
Loading…
Reference in a new issue