mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 10:17:40 +02:00
Do not use ownership tracking in serverless mode in PhysicalEntitySimulation
This commit is contained in:
parent
cf9cf45d02
commit
67c605c10a
1 changed files with 5 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue