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 | 562 | if (entity) { |
| 563 | 563 | if (properties.hasSimulationRestrictedChanges()) { |
| 564 | 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 | 568 | if (simulationOwner.getID() == sessionID) { |
| 566 | 569 | // we own the simulation --> copy ALL restricted properties |
| 567 | 570 | properties.copySimulationRestrictedProperties(entity); |
| 568 | 571 | } else { |
| 569 | 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 | 574 | uint8_t desiredPriority = entity->getScriptSimulationPriority(); |
| 575 | 575 | if (desiredPriority < simulationOwner.getPriority()) { |