also fix priority inheritance from chained collisions
Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 9 files). Show all
Unified · Split
| @@ -161,9 +161,11 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, EntityItemProperties proper · 160 unmodified lines | ||
| 161 | 161 | // proxy toward the true physical position" feature to hide the final glitches in the remote watcher's |
| 162 | 162 | // simulation. |
| 163 | 163 | |
| 164 | − // we re-assert our simulation ownership | |
| 165 | − properties.setSimulationOwner(myNodeID, | |
| 166 | − glm::max(entity->getSimulationPriority(), SCRIPT_EDIT_SIMULATION_PRIORITY)); | |
| 164 | + if (entity->getSimulationPriority() < SCRIPT_EDIT_SIMULATION_PRIORITY) { | |
| 165 | + // we re-assert our simulation ownership at a higher priority | |
| 166 | + properties.setSimulationOwner(myNodeID, | |
| 167 | + glm::max(entity->getSimulationPriority(), SCRIPT_EDIT_SIMULATION_PRIORITY)); | |
| 168 | + } | |
| 167 | 169 | } else { |
| 168 | 170 | // we make a bid for simulation ownership |
| 169 | 171 | properties.setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATION_PRIORITY); |