mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:24:00 +02:00
cleanup PhysicalEntitySimulation::_outgoingChanges
This commit is contained in:
parent
d4701b4310
commit
50f73602f6
2 changed files with 8 additions and 6 deletions
|
@ -68,6 +68,7 @@ void PhysicalEntitySimulation::removeEntityInternal(EntityItem* entity) {
|
|||
motionState->clearEntity();
|
||||
entity->setPhysicsInfo(nullptr);
|
||||
_pendingRemoves.insert(motionState);
|
||||
_outgoingChanges.remove(motionState);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,6 +82,7 @@ void PhysicalEntitySimulation::changeEntityInternal(EntityItem* entity) {
|
|||
_pendingChanges.remove(motionState);
|
||||
_physicalObjects.remove(motionState);
|
||||
_pendingRemoves.insert(motionState);
|
||||
_outgoingChanges.remove(motionState);
|
||||
if (entity->isMoving()) {
|
||||
_simpleKinematicEntities.insert(entity);
|
||||
}
|
||||
|
|
|
@ -37,11 +37,11 @@ public:
|
|||
|
||||
protected: // only called by EntitySimulation
|
||||
// overrides for EntitySimulation
|
||||
void updateEntitiesInternal(const quint64& now);
|
||||
void addEntityInternal(EntityItem* entity);
|
||||
void removeEntityInternal(EntityItem* entity);
|
||||
void changeEntityInternal(EntityItem* entity);
|
||||
void clearEntitiesInternal();
|
||||
virtual void updateEntitiesInternal(const quint64& now);
|
||||
virtual void addEntityInternal(EntityItem* entity);
|
||||
virtual void removeEntityInternal(EntityItem* entity);
|
||||
virtual void changeEntityInternal(EntityItem* entity);
|
||||
virtual void clearEntitiesInternal();
|
||||
|
||||
public:
|
||||
VectorOfMotionStates& getObjectsToDelete();
|
||||
|
@ -58,7 +58,7 @@ private:
|
|||
SetOfEntityMotionStates _pendingChanges; // EntityMotionStates already in PhysicsEngine that need their physics changed
|
||||
|
||||
// outgoing changes
|
||||
QSet<EntityMotionState*> _outgoingChanges; // EntityMotionStates for which we need to send updates to entity-server
|
||||
SetOfEntityMotionStates _outgoingChanges; // EntityMotionStates for which we need to send updates to entity-server
|
||||
|
||||
SetOfMotionStates _physicalObjects; // MotionStates of entities in PhysicsEngine
|
||||
VectorOfMotionStates _tempVector; // temporary array reference, valid immediately after getObjectsToRemove() (and friends)
|
||||
|
|
Loading…
Reference in a new issue