Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -562,14 +562,14 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 561 unmodified lines | |||
| 562 | if (entity) { | 562 | if (entity) { |
| 563 | if (properties.hasSimulationRestrictedChanges()) { | 563 | if (properties.hasSimulationRestrictedChanges()) { |
| 564 | if (_bidOnSimulationOwnership) { | 564 | if (_bidOnSimulationOwnership) { |
| 565 | // flag for simulation ownership, or upgrade existing ownership priority | ||
| 566 | // (actual bids for simulation ownership are sent by the PhysicalEntitySimulation) | ||
| 567 | entity->upgradeScriptSimulationPriority(properties.computeSimulationBidPriority()); | ||
| 565 | if (simulationOwner.getID() == sessionID) { | 568 | if (simulationOwner.getID() == sessionID) { |
| 566 | // we own the simulation --> copy ALL restricted properties | 569 | // we own the simulation --> copy ALL restricted properties |
| 567 | properties.copySimulationRestrictedProperties(entity); | 570 | properties.copySimulationRestrictedProperties(entity); |
| 568 | } else { | 571 | } else { |
| 569 | // we don't own the simulation but think we would like to | 572 | // we don't own the simulation but think we would like to |
| 570 | // --> flag the object for simulation ownership at at least POKE | ||
| 571 | // (the bid for simulation ownership (if any) will be sent by the physics simulation) | ||
| 572 | entity->upgradeScriptSimulationPriority(SCRIPT_POKE_SIMULATION_PRIORITY); | ||
| 573 | 573 | ||
| 574 | uint8_t desiredPriority = entity->getScriptSimulationPriority(); | 574 | uint8_t desiredPriority = entity->getScriptSimulationPriority(); |
| 575 | if (desiredPriority < simulationOwner.getPriority()) { | 575 | if (desiredPriority < simulationOwner.getPriority()) { |