fix crash mode when leaving domain with handgun

This commit is contained in:
Andrew Meadows 2015-12-16 15:10:30 -08:00
parent c14433979b
commit ff83f8fc37

View file

@ -44,7 +44,7 @@ void PhysicalEntitySimulation::updateEntitiesInternal(const quint64& now) {
void PhysicalEntitySimulation::addEntityInternal(EntityItemPointer entity) { void PhysicalEntitySimulation::addEntityInternal(EntityItemPointer entity) {
assert(entity); assert(entity);
if (entity->shouldBePhysical()) { if (entity->shouldBePhysical()) {
EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo()); EntityMotionState* motionState = static_cast<EntityMotionState*>(entity->getPhysicsInfo());
if (!motionState) { if (!motionState) {
_pendingAdds.insert(entity); _pendingAdds.insert(entity);
@ -117,6 +117,7 @@ void PhysicalEntitySimulation::clearEntitiesInternal() {
_pendingRemoves.clear(); _pendingRemoves.clear();
_pendingAdds.clear(); _pendingAdds.clear();
_pendingChanges.clear(); _pendingChanges.clear();
_outgoingChanges.clear();
} }
// end EntitySimulation overrides // end EntitySimulation overrides