Merge pull request #16239 from AndrewMeadows/cleanup-mortal-entities

BUGZ-1510: don't forget to cleanup expired mortal entities
This commit is contained in:
Andrew Meadows 2019-09-26 16:20:27 -07:00 committed by GitHub
commit f3aa534327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,8 @@ void PhysicalEntitySimulation::removeEntityInternal(EntityItemPointer entity) {
if (motionState) {
removeOwnershipData(motionState);
_entitiesToRemoveFromPhysics.insert(entity);
} else if (entity->isDead() && entity->getElement()) {
}
if (entity->isDead() && entity->getElement()) {
_deadEntities.insert(entity);
}
}