Merge pull request #13920 from AndrewMeadows/dont-bid-for-locked

don't bid for simulation ownership of locked entities
This commit is contained in:
Sam Gateau 2018-09-04 13:26:21 -07:00 committed by GitHub
commit b92d1061c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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