mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +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) {
|
void PhysicalEntitySimulation::addOwnershipBid(EntityMotionState* motionState) {
|
||||||
if (getEntityTree()->isServerlessMode()) {
|
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 {
|
|
||||||
motionState->initForBid();
|
motionState->initForBid();
|
||||||
motionState->sendBid(_entityPacketSender, _physicsEngine->getNumSubsteps());
|
motionState->sendBid(_entityPacketSender, _physicsEngine->getNumSubsteps());
|
||||||
_bids.push_back(motionState);
|
_bids.push_back(motionState);
|
||||||
|
@ -343,8 +337,10 @@ void PhysicalEntitySimulation::addOwnershipBid(EntityMotionState* motionState) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicalEntitySimulation::addOwnership(EntityMotionState* motionState) {
|
void PhysicalEntitySimulation::addOwnership(EntityMotionState* motionState) {
|
||||||
motionState->initForOwned();
|
if (!getEntityTree()->isServerlessMode()) {
|
||||||
_owned.push_back(motionState);
|
motionState->initForOwned();
|
||||||
|
_owned.push_back(motionState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicalEntitySimulation::sendOwnershipBids(uint32_t numSubsteps) {
|
void PhysicalEntitySimulation::sendOwnershipBids(uint32_t numSubsteps) {
|
||||||
|
|
Loading…
Reference in a new issue