remove some debugging prints

This commit is contained in:
Seth Alves 2015-04-22 15:03:23 -07:00
parent 92ceff1a03
commit 3450597d70
3 changed files with 4 additions and 31 deletions

View file

@ -72,8 +72,7 @@ EntityItem::EntityItem(const EntityItemID& entityItemID) :
_lastUpdated = now;
}
EntityItem::EntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :
EntityItem(entityItemID)
EntityItem::EntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID)
{
setProperties(properties);
}

View file

@ -200,7 +200,6 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationFrame) {
const QUuid& myNodeID = nodeList->getSessionUUID();
const QUuid& simulatorID = _entity->getSimulatorID();
// 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;
@ -280,24 +279,13 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
properties.setAngularVelocity(_sentAngularVelocity);
}
auto nodeList = DependencyManager::get<NodeList>();
QUuid myNodeID = nodeList->getSessionUUID();
// QUuid simulatorID = _entity->getSimulatorID();
if (_entity->getShouldClaimSimulationOwnership()) {
auto nodeList = DependencyManager::get<NodeList>();
QUuid myNodeID = nodeList->getSessionUUID();
_entity->setSimulatorID(myNodeID);
properties.setSimulatorID(myNodeID);
_entity->setShouldClaimSimulationOwnership(false);
}
// else if (simulatorID.isNull() && !(zeroSpeed && zeroSpin)) {
// // The object is moving and nobody thinks they own the motion. set this Node as the simulator
// _entity->setSimulatorID(myNodeID);
// properties.setSimulatorID(myNodeID);
// } else if (simulatorID == myNodeID && zeroSpeed && zeroSpin) {
// // we are the simulator and the object has stopped. give up "simulator" status
// _entity->setSimulatorID(QUuid());
// properties.setSimulatorID(QUuid());
// }
// RELIABLE_SEND_HACK: count number of updates for entities at rest so we can stop sending them after some limit.
if (_sentMoving) {

View file

@ -401,29 +401,15 @@ void PhysicsEngine::computeCollisionEvents() {
// collisions cause infections spread of simulation-ownership. we also attempt to take
// ownership of anything that collides with our avatar.
if (entityA && entityB &&
!objectA->isStaticOrKinematicObject() &&
!objectB->isStaticOrKinematicObject()) {
if (entityA && entityB && !objectA->isStaticOrKinematicObject() && !objectB->isStaticOrKinematicObject()) {
if (entityA->getSimulatorID() == myNodeID ||
entityA->getShouldClaimSimulationOwnership() ||
objectA == characterCollisionObject) {
qDebug() << "collision claiming ownership 0"
<< (entityA->getSimulatorID() == myNodeID)
<< (entityA->getShouldClaimSimulationOwnership())
<< (objectA == characterCollisionObject) << myNodeID;
entityB->setShouldClaimSimulationOwnership(true);
}
if (entityB->getSimulatorID() == myNodeID ||
entityB->getShouldClaimSimulationOwnership() ||
objectB == characterCollisionObject) {
qDebug() << "collision claiming ownership 1"
<< (entityB->getSimulatorID() == myNodeID)
<< (entityB->getShouldClaimSimulationOwnership())
<< (objectB == characterCollisionObject) << myNodeID;
entityA->setShouldClaimSimulationOwnership(true);
}
}