don't bid for simulation ownership of locked things

This commit is contained in:
Andrew Meadows 2018-08-31 13:31:26 -07:00
parent a7fd35747d
commit 727bd6b05a

View file

@ -778,8 +778,10 @@ void EntityMotionState::computeCollisionGroupAndMask(int32_t& group, int32_t& ma
bool EntityMotionState::shouldSendBid() const {
// NOTE: this method is only ever called when the entity's simulation is NOT locally owned
return _body->isActive() && (_region == workload::Region::R1) &&
glm::max(glm::max(VOLUNTEER_SIMULATION_PRIORITY, _bumpedPriority), _entity->getScriptSimulationPriority()) >= _entity->getSimulationPriority();
return _body->isActive()
&& (_region == workload::Region::R1)
&& glm::max(glm::max(VOLUNTEER_SIMULATION_PRIORITY, _bumpedPriority), _entity->getScriptSimulationPriority()) >= _entity->getSimulationPriority()
&& !_entity->getLocked();
}
uint8_t EntityMotionState::computeFinalBidPriority() const {