Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -25,8 +25,9 @@ · 24 unmodified lines | |||
| 25 | #include "ZoneEntityItem.h" | 25 | #include "ZoneEntityItem.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | EntityScriptingInterface::EntityScriptingInterface() : | 28 | EntityScriptingInterface::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 | ||