harvest outgoing changes for non-NULL entities

This commit is contained in:
Andrew Meadows 2015-05-06 16:01:25 -07:00
parent 584b643791
commit 7b1886a285

View file

@ -194,8 +194,11 @@ void PhysicalEntitySimulation::handleOutgoingChanges(VectorOfMotionStates& motio
ObjectMotionState* state = &(*stateItr);
if (state && state->getType() == MOTION_STATE_TYPE_ENTITY) {
EntityMotionState* entityState = static_cast<EntityMotionState*>(state);
_outgoingChanges.insert(entityState);
_entitiesToSort.insert(entityState->getEntity());
EntityItem* entity = entityState->getEntity();
if (entity) {
_outgoingChanges.insert(entityState);
_entitiesToSort.insert(entityState->getEntity());
}
}
}