mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 06:53:46 +02:00
clean up actions when DeleteEntityOperator's list is processed rather than as it's made
This commit is contained in:
parent
57d85cece0
commit
9cae11cc3c
2 changed files with 1 additions and 7 deletions
|
@ -46,13 +46,6 @@ void DeleteEntityOperator::addEntityIDToDeleteList(const EntityItemID& searchEnt
|
|||
//assert(false);
|
||||
qCDebug(entities) << "that's UNEXPECTED, we got a _containingElement, but couldn't find the oldEntity!";
|
||||
} else {
|
||||
const EntityTree* tree = details.containingElement->getTree();
|
||||
if (tree) {
|
||||
EntitySimulation* simulation = tree->getSimulation();
|
||||
if (simulation) {
|
||||
details.entity->clearActions(simulation);
|
||||
}
|
||||
}
|
||||
details.cube = details.containingElement->getAACube();
|
||||
_entitiesToDelete << details;
|
||||
_lookingCount++;
|
||||
|
|
|
@ -381,6 +381,7 @@ void EntityTree::processRemovedEntities(const DeleteEntityOperator& theOperator)
|
|||
}
|
||||
|
||||
if (_simulation) {
|
||||
theEntity->clearActions(_simulation);
|
||||
_simulation->removeEntity(theEntity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue