Do not use ownership tracking in serverless mode in PhysicalEntitySimulation

This commit is contained in:
sabrina-shanman 2018-06-18 16:12:38 -07:00
parent cf9cf45d02
commit 67c605c10a

View file

@ -328,13 +328,7 @@ void PhysicalEntitySimulation::handleChangedMotionStates(const VectorOfMotionSta
}
void PhysicalEntitySimulation::addOwnershipBid(EntityMotionState* motionState) {
if (getEntityTree()->isServerlessMode()) {
EntityItemPointer entity = motionState->getEntity();
auto nodeList = DependencyManager::get<NodeList>();
auto sessionID = nodeList->getSessionUUID();
entity->setSimulationOwner(SimulationOwner(sessionID, SCRIPT_GRAB_SIMULATION_PRIORITY));
_owned.push_back(motionState);
} else {
if (!getEntityTree()->isServerlessMode()) {
motionState->initForBid();
motionState->sendBid(_entityPacketSender, _physicsEngine->getNumSubsteps());
_bids.push_back(motionState);
@ -343,8 +337,10 @@ void PhysicalEntitySimulation::addOwnershipBid(EntityMotionState* motionState) {
}
void PhysicalEntitySimulation::addOwnership(EntityMotionState* motionState) {
motionState->initForOwned();
_owned.push_back(motionState);
if (!getEntityTree()->isServerlessMode()) {
motionState->initForOwned();
_owned.push_back(motionState);
}
}
void PhysicalEntitySimulation::sendOwnershipBids(uint32_t numSubsteps) {