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
25#include "ZoneEntityItem.h"25#include "ZoneEntityItem.h"
26 26
27 27
28EntityScriptingInterface::EntityScriptingInterface() :28EntityScriptingInterface::EntityScriptingInterface(bool bidOnSimulationOwnership) :
29 _entityTree(NULL)29 _entityTree(NULL),
30 _bidOnSimulationOwnership(bidOnSimulationOwnership)
30{31{
31 auto nodeList = DependencyManager::get<NodeList>();32 auto nodeList = DependencyManager::get<NodeList>();
32 connect(nodeList.data(), &NodeList::canAdjustLocksChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);33 connect(nodeList.data(), &NodeList::canAdjustLocksChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);
@@ -255,7 +256,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 222 unmodified lines
255 properties.setType(entity->getType());256 properties.setType(entity->getType());
256 bool hasTerseUpdateChanges = properties.hasTerseUpdateChanges();257 bool hasTerseUpdateChanges = properties.hasTerseUpdateChanges();
257 bool hasPhysicsChanges = properties.hasMiscPhysicsChanges() || hasTerseUpdateChanges;258 bool hasPhysicsChanges = properties.hasMiscPhysicsChanges() || hasTerseUpdateChanges;
258 if (hasPhysicsChanges) {259 if (_bidOnSimulationOwnership && hasPhysicsChanges) {
259 auto nodeList = DependencyManager::get<NodeList>();260 auto nodeList = DependencyManager::get<NodeList>();
260 const QUuid myNodeID = nodeList->getSessionUUID();261 const QUuid myNodeID = nodeList->getSessionUUID();
261 262