From 51ac44a9b7388a7d372fc103e2b9198dc91439e5 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 15 Apr 2015 11:34:42 -0700 Subject: [PATCH] try to increase chances the interface gives up simulation ownership --- libraries/physics/src/EntityMotionState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index 5d5435eb5e..db79581812 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 && _numNonMovingUpdates == MAX_NUM_NON_MOVING_UPDATES) { + } else if (simulatorID == myNodeID && _numNonMovingUpdates >= MAX_NUM_NON_MOVING_UPDATES - 1) { // we are the simulator and the object has stopped. give up "simulator" status _entity->setSimulatorID(""); properties.setSimulatorID(""); @@ -287,7 +287,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_ properties.setLastEdited(_entity->getLastEdited()); } - if (EntityItem::getSendPhysicsUpdates() /* && _numNonMovingUpdates <= MAX_NUM_NON_MOVING_UPDATES*/) { + if (EntityItem::getSendPhysicsUpdates()) { EntityItemID id(_entity->getID()); EntityEditPacketSender* entityPacketSender = static_cast(packetSender); #ifdef WANT_DEBUG