From 7e01f97f8fe1ba3ffb176c8ee17628e55556b10a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 4 Jan 2018 12:06:26 -0800 Subject: [PATCH] more correct volunteer ownership priority promotion --- libraries/entities/src/EntityTree.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index 8f780355db..8899486dc8 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -354,13 +354,11 @@ bool EntityTree::updateEntity(EntityItemPointer entity, const EntityItemProperti // else: We assume the sender really did believe it was the simulation owner when it sent } else if (submittedID == senderID) { // the sender is trying to take or continue ownership - if (entity->getSimulatorID().isNull()) { - // the sender it taking ownership + if (entity->getSimulatorID().isNull() || entity->getSimulatorID() == senderID) { + // the sender is taking or asserting ownership + // but we never grant priorities lower than RECRUIT properties.promoteSimulationPriority(RECRUIT_SIMULATION_PRIORITY); simulationBlocked = false; - } else if (entity->getSimulatorID() == senderID) { - // the sender is asserting ownership - simulationBlocked = false; } else { // the sender is trying to steal ownership from another simulator // so we apply the rules for ownership change: