History

always remove from _pendingAdds just in case

Andrew Meadows committed 11 years ago

Commit e7e4d801 parent 1879a671 file · +1 −6Browse files

Showing the changes to libraries/physics/src/PhysicalEntitySimulation.cpp (1 of 1 file). Show all

Unified · Split

libraries/physics/src/PhysicalEntitySimulation.cpp+1−6
@@ -62,15 +62,10 @@ void PhysicalEntitySimulation::removeEntityInternal(EntityItem* entity) { · 61 unmodified lines
6262 if (motionState) {
6363 motionState->clearEntity();
6464 entity->setPhysicsInfo(nullptr);
65−
66− // NOTE: we must remove entity from _pendingAdds immediately because we've disconnected the backpointers between
67− // motionState and entity and they can't be used to look up each other. However we don't need to remove
68− // motionState from _pendingChanges at this time becuase it will be removed during getObjectsToDelete().
69− _pendingAdds.remove(entity);
70−
7165 _pendingRemoves.insert(motionState);
7266 _outgoingChanges.remove(motionState);
7367 }
68+ _pendingAdds.remove(entity);
7469 }
7570
7671 void PhysicalEntitySimulation::changeEntityInternal(EntityItem* entity) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t