mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-09 16:28:51 +02:00
experimenting
This commit is contained in:
parent
cd3ee39fcc
commit
36dbbd0c9d
2 changed files with 14 additions and 3 deletions
|
@ -200,7 +200,8 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationFrame) {
|
||||||
const QUuid& myNodeID = nodeList->getSessionUUID();
|
const QUuid& myNodeID = nodeList->getSessionUUID();
|
||||||
const QUuid& simulatorID = _entity->getSimulatorID();
|
const QUuid& simulatorID = _entity->getSimulatorID();
|
||||||
|
|
||||||
if (!simulatorID.isNull() && simulatorID != myNodeID) {
|
// if (!simulatorID.isNull() && simulatorID != myNodeID) {
|
||||||
|
if (simulatorID != myNodeID) {
|
||||||
// some other Node owns the simulating of this, so don't broadcast the results of local simulation.
|
// some other Node owns the simulating of this, so don't broadcast the results of local simulation.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -407,14 +407,24 @@ void PhysicsEngine::computeCollisionEvents() {
|
||||||
if (entityA->getSimulatorID() == myNodeID ||
|
if (entityA->getSimulatorID() == myNodeID ||
|
||||||
entityA->getShouldClaimSimulationOwnership() ||
|
entityA->getShouldClaimSimulationOwnership() ||
|
||||||
objectA == characterCollisionObject) {
|
objectA == characterCollisionObject) {
|
||||||
|
|
||||||
|
qDebug() << "collision claiming ownership"
|
||||||
|
<< (entityA->getSimulatorID() == myNodeID)
|
||||||
|
<< (entityA->getShouldClaimSimulationOwnership())
|
||||||
|
<< (objectA == characterCollisionObject);
|
||||||
|
|
||||||
entityB->setShouldClaimSimulationOwnership(true);
|
entityB->setShouldClaimSimulationOwnership(true);
|
||||||
qDebug() << "collision claiming ownership";
|
|
||||||
}
|
}
|
||||||
if (entityB->getSimulatorID() == myNodeID ||
|
if (entityB->getSimulatorID() == myNodeID ||
|
||||||
entityB->getShouldClaimSimulationOwnership() ||
|
entityB->getShouldClaimSimulationOwnership() ||
|
||||||
objectB == characterCollisionObject) {
|
objectB == characterCollisionObject) {
|
||||||
|
|
||||||
|
qDebug() << "collision claiming ownership"
|
||||||
|
<< (entityB->getSimulatorID() == myNodeID)
|
||||||
|
<< (entityB->getShouldClaimSimulationOwnership())
|
||||||
|
<< (objectB == characterCollisionObject);
|
||||||
|
|
||||||
entityA->setShouldClaimSimulationOwnership(true);
|
entityA->setShouldClaimSimulationOwnership(true);
|
||||||
qDebug() << "collision claiming ownership";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue