mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
always remove from _pendingAdds just in case
This commit is contained in:
parent
1879a67804
commit
e7e4d80be5
1 changed files with 1 additions and 6 deletions
|
@ -62,15 +62,10 @@ void PhysicalEntitySimulation::removeEntityInternal(EntityItem* entity) {
|
|||
if (motionState) {
|
||||
motionState->clearEntity();
|
||||
entity->setPhysicsInfo(nullptr);
|
||||
|
||||
// NOTE: we must remove entity from _pendingAdds immediately because we've disconnected the backpointers between
|
||||
// motionState and entity and they can't be used to look up each other. However we don't need to remove
|
||||
// motionState from _pendingChanges at this time becuase it will be removed during getObjectsToDelete().
|
||||
_pendingAdds.remove(entity);
|
||||
|
||||
_pendingRemoves.insert(motionState);
|
||||
_outgoingChanges.remove(motionState);
|
||||
}
|
||||
_pendingAdds.remove(entity);
|
||||
}
|
||||
|
||||
void PhysicalEntitySimulation::changeEntityInternal(EntityItem* entity) {
|
||||
|
|
Loading…
Reference in a new issue