History

Fix Agents bidding on simulation ownership

Ryan Huffman committed 10 years ago

Commit eff02d31 parent ee963415 files · +10 −8Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+4−3
@@ -25,8 +25,9 @@ · 24 unmodified lines
2525 #include "ZoneEntityItem.h"
2626
2727
28−EntityScriptingInterface::EntityScriptingInterface() :
29− _entityTree(NULL)
28+EntityScriptingInterface::EntityScriptingInterface(bool bidOnSimulationOwnership) :
29+ _entityTree(NULL),
30+ _bidOnSimulationOwnership(bidOnSimulationOwnership)
3031 {
3132 auto nodeList = DependencyManager::get<NodeList>();
3233 connect(nodeList.data(), &NodeList::canAdjustLocksChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);
@@ -255,7 +256,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 222 unmodified lines
255256 properties.setType(entity->getType());
256257 bool hasTerseUpdateChanges = properties.hasTerseUpdateChanges();
257258 bool hasPhysicsChanges = properties.hasMiscPhysicsChanges() || hasTerseUpdateChanges;
258− if (hasPhysicsChanges) {
259+ if (_bidOnSimulationOwnership && hasPhysicsChanges) {
259260 auto nodeList = DependencyManager::get<NodeList>();
260261 const QUuid myNodeID = nodeList->getSessionUUID();
261262