experimenting

This commit is contained in:
Seth Alves 2015-04-22 14:14:12 -07:00
parent cd3ee39fcc
commit 36dbbd0c9d
2 changed files with 14 additions and 3 deletions

View file

@ -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;
}

View file

@ -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";
}
}
}