Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 9 files). Show all
Unified · Split
| @@ -277,7 +277,7 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 276 unmodified lines | |||
| 277 | 277 | ||
| 278 | entity->setLastBroadcast(usecTimestampNow()); | 278 | entity->setLastBroadcast(usecTimestampNow()); |
| 279 | // since we're creating this object we will immediately volunteer to own its simulation | 279 | // since we're creating this object we will immediately volunteer to own its simulation |
| 280 | entity->flagForOwnershipBid(VOLUNTEER_SIMULATION_PRIORITY); | 280 | entity->setScriptSimulationPriority(VOLUNTEER_SIMULATION_PRIORITY); |
| 281 | propertiesWithSimID.setLastEdited(entity->getLastEdited()); | 281 | propertiesWithSimID.setLastEdited(entity->getLastEdited()); |
| 282 | } else { | 282 | } else { |
| 283 | qCDebug(entities) << "script failed to add new Entity to local Octree"; | 283 | qCDebug(entities) << "script failed to add new Entity to local Octree"; |
| @@ -465,7 +465,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 181 unmodified lines | |||
| 465 | } else { | 465 | } else { |
| 466 | // we make a bid for simulation ownership | 466 | // we make a bid for simulation ownership |
| 467 | properties.setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY); | 467 | properties.setSimulationOwner(myNodeID, SCRIPT_POKE_SIMULATION_PRIORITY); |
| 468 | entity->flagForOwnershipBid(SCRIPT_POKE_SIMULATION_PRIORITY); | 468 | entity->setScriptSimulationPriority(SCRIPT_POKE_SIMULATION_PRIORITY); |
| 469 | } | 469 | } |
| 470 | } | 470 | } |
| 471 | if (properties.queryAACubeRelatedPropertyChanged()) { | 471 | if (properties.queryAACubeRelatedPropertyChanged()) { |
| @@ -1334,7 +1334,7 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString, · 862 unmodified lines | |||
| 1334 | } | 1334 | } |
| 1335 | action->setIsMine(true); | 1335 | action->setIsMine(true); |
| 1336 | success = entity->addAction(simulation, action); | 1336 | success = entity->addAction(simulation, action); |
| 1337 | entity->flagForOwnershipBid(SCRIPT_GRAB_SIMULATION_PRIORITY); | 1337 | entity->setScriptSimulationPriority(SCRIPT_GRAB_SIMULATION_PRIORITY); |
| 1338 | return false; // Physics will cause a packet to be sent, so don't send from here. | 1338 | return false; // Physics will cause a packet to be sent, so don't send from here. |
| 1339 | }); | 1339 | }); |
| 1340 | if (success) { | 1340 | if (success) { |
| @@ -1350,7 +1350,7 @@ bool EntityScriptingInterface::updateAction(const QUuid& entityID, const QUuid& · 9 unmodified lines | |||
| 1350 | return actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { | 1350 | return actionWorker(entityID, [&](EntitySimulationPointer simulation, EntityItemPointer entity) { |
| 1351 | bool success = entity->updateAction(simulation, actionID, arguments); | 1351 | bool success = entity->updateAction(simulation, actionID, arguments); |
| 1352 | if (success) { | 1352 | if (success) { |
| 1353 | entity->flagForOwnershipBid(SCRIPT_GRAB_SIMULATION_PRIORITY); | 1353 | entity->setScriptSimulationPriority(SCRIPT_GRAB_SIMULATION_PRIORITY); |
| 1354 | } | 1354 | } |
| 1355 | return success; | 1355 | return success; |
| 1356 | }); | 1356 | }); |
| @@ -1364,7 +1364,7 @@ bool EntityScriptingInterface::deleteAction(const QUuid& entityID, const QUuid& · 7 unmodified lines | |||
| 1364 | success = entity->removeAction(simulation, actionID); | 1364 | success = entity->removeAction(simulation, actionID); |
| 1365 | if (success) { | 1365 | if (success) { |
| 1366 | // reduce from grab to poke | 1366 | // reduce from grab to poke |
| 1367 | entity->flagForOwnershipBid(SCRIPT_POKE_SIMULATION_PRIORITY); | 1367 | entity->setScriptSimulationPriority(SCRIPT_POKE_SIMULATION_PRIORITY); |
| 1368 | } | 1368 | } |
| 1369 | return false; // Physics will cause a packet to be sent, so don't send from here. | 1369 | return false; // Physics will cause a packet to be sent, so don't send from here. |
| 1370 | }); | 1370 | }); |