From e25590f00e6b544c00de3ef663dfd7dce0e282af Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 14 Apr 2015 13:37:57 -0700 Subject: [PATCH] don't give up ownership of simulation until the last packet is sent --- libraries/physics/src/EntityMotionState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index 33f9630e4f..1abbe59f8e 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -255,7 +255,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_ // The object is moving and nobody thinks they own the motion. set this Node as the simulator _entity->setSimulatorID(myNodeID); properties.setSimulatorID(myNodeID); - } else if (simulatorID == myNodeID && zeroSpin && zeroSpin) { + } else if (simulatorID == myNodeID && zeroSpin && _numNonMovingUpdates == 3) { // we are the simulator and the object has stopped. give up "simulator" status _entity->setSimulatorID(""); properties.setSimulatorID("");