mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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& 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.
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -407,14 +407,24 @@ void PhysicsEngine::computeCollisionEvents() {
|
|||
if (entityA->getSimulatorID() == myNodeID ||
|
||||
entityA->getShouldClaimSimulationOwnership() ||
|
||||
objectA == characterCollisionObject) {
|
||||
|
||||
qDebug() << "collision claiming ownership"
|
||||
<< (entityA->getSimulatorID() == myNodeID)
|
||||
<< (entityA->getShouldClaimSimulationOwnership())
|
||||
<< (objectA == characterCollisionObject);
|
||||
|
||||
entityB->setShouldClaimSimulationOwnership(true);
|
||||
qDebug() << "collision claiming ownership";
|
||||
}
|
||||
if (entityB->getSimulatorID() == myNodeID ||
|
||||
entityB->getShouldClaimSimulationOwnership() ||
|
||||
objectB == characterCollisionObject) {
|
||||
|
||||
qDebug() << "collision claiming ownership"
|
||||
<< (entityB->getSimulatorID() == myNodeID)
|
||||
<< (entityB->getShouldClaimSimulationOwnership())
|
||||
<< (objectB == characterCollisionObject);
|
||||
|
||||
entityA->setShouldClaimSimulationOwnership(true);
|
||||
qDebug() << "collision claiming ownership";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue