mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-17 13:19:53 +02:00
more correct comments
This commit is contained in:
parent
5649748b17
commit
0596497930
1 changed files with 4 additions and 2 deletions
|
@ -80,8 +80,6 @@ void PhysicalEntitySimulation::takeEntitiesToDelete(VectorOfEntities& entitiesTo
|
||||||
// this entity is still in its tree, so we insert into the external list
|
// this entity is still in its tree, so we insert into the external list
|
||||||
entitiesToDelete.push_back(entity);
|
entitiesToDelete.push_back(entity);
|
||||||
|
|
||||||
// Someday when we invert the entities/physics lib dependencies we can let EntityItem delete its own PhysicsInfo
|
|
||||||
// rather than do it here
|
|
||||||
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
|
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
|
||||||
if (motionState) {
|
if (motionState) {
|
||||||
_entitiesToRemoveFromPhysics.insert(entity);
|
_entitiesToRemoveFromPhysics.insert(entity);
|
||||||
|
@ -141,6 +139,8 @@ void PhysicalEntitySimulation::clearEntitiesInternal() {
|
||||||
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
|
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
|
||||||
if (motionState) {
|
if (motionState) {
|
||||||
entity->setPhysicsInfo(nullptr);
|
entity->setPhysicsInfo(nullptr);
|
||||||
|
// someday when we invert the entities/physics lib dependencies we can let EntityItem delete its own PhysicsInfo
|
||||||
|
// until then we must do it here
|
||||||
delete motionState;
|
delete motionState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,6 +192,8 @@ void PhysicalEntitySimulation::deleteObjectsRemovedFromPhysics() {
|
||||||
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
|
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
|
||||||
assert(motionState);
|
assert(motionState);
|
||||||
entity->setPhysicsInfo(nullptr);
|
entity->setPhysicsInfo(nullptr);
|
||||||
|
// someday when we invert the entities/physics lib dependencies we can let EntityItem delete its own PhysicsInfo
|
||||||
|
// until then we must do it here
|
||||||
delete motionState;
|
delete motionState;
|
||||||
|
|
||||||
if (entity->isDead()) {
|
if (entity->isDead()) {
|
||||||
|
|
Loading…
Reference in a new issue