mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 05:09:23 +02:00
removeOwnershipData() last minute before EntityMotionState delete
This commit is contained in:
parent
bfe809f3f7
commit
351f9991eb
1 changed files with 2 additions and 0 deletions
|
@ -460,6 +460,8 @@ void PhysicalEntitySimulation::buildPhysicsTransaction(PhysicsEngine::Transactio
|
||||||
void PhysicalEntitySimulation::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) {
|
void PhysicalEntitySimulation::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) {
|
||||||
// things on objectsToRemove are ready for delete
|
// things on objectsToRemove are ready for delete
|
||||||
for (auto object : transaction.objectsToRemove) {
|
for (auto object : transaction.objectsToRemove) {
|
||||||
|
EntityMotionState* entityState = static_cast<EntityMotionState*>(object);
|
||||||
|
removeOwnershipData(entityState);
|
||||||
_physicalObjects.remove(object);
|
_physicalObjects.remove(object);
|
||||||
delete object;
|
delete object;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue