History

Merge branch 'master' into bug-fix/tablet-ui-no-domain

Anthony J. Thibault committed 9 years ago

Commit 6bef9e82 parents e2e1988 f40285c70 files · +1837 −688Browse files

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

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+10−6
@@ -226,6 +226,7 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 225 unmodified lines
226 // and make note of it now, so we can act on it right away.226 // and make note of it now, so we can act on it right away.
227 propertiesWithSimID.setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY);227 propertiesWithSimID.setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY);
228 entity->setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY);228 entity->setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY);
229 entity->rememberHasSimulationOwnershipBid();
229 }230 }
230 231
231 entity->setLastBroadcast(usecTimestampNow());232 entity->setLastBroadcast(usecTimestampNow());
@@ -436,6 +437,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 204 unmodified lines
436 // we make a bid for simulation ownership437 // we make a bid for simulation ownership
437 properties.setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY);438 properties.setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY);
438 entity->pokeSimulationOwnership();439 entity->pokeSimulationOwnership();
440 entity->rememberHasSimulationOwnershipBid();
439 }441 }
440 }442 }
441 if (properties.parentRelatedPropertyChanged() && entity->computePuffedQueryAACube()) {443 if (properties.parentRelatedPropertyChanged() && entity->computePuffedQueryAACube()) {
@@ -1359,12 +1361,14 @@ bool EntityScriptingInterface::isChildOfParent(QUuid childID, QUuid parentID) { · 917 unmodified lines
1359 1361
1360 _entityTree->withReadLock([&] {1362 _entityTree->withReadLock([&] {
1361 EntityItemPointer parent = _entityTree->findEntityByEntityItemID(parentID);1363 EntityItemPointer parent = _entityTree->findEntityByEntityItemID(parentID);
1362 parent->forEachDescendant([&](SpatiallyNestablePointer descendant) {1364 if (parent) {
1363 if(descendant->getID() == childID) {1365 parent->forEachDescendant([&](SpatiallyNestablePointer descendant) {
1364 isChild = true;1366 if (descendant->getID() == childID) {
1365 return;1367 isChild = true;
1366 }1368 return;
1367 });1369 }
1370 });
1371 }
1368 });1372 });
1369 1373
1370 return isChild;1374 return isChild;