mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-29 10:31:22 +02:00
experimenting
This commit is contained in:
parent
69ee33a392
commit
cd3ee39fcc
2 changed files with 4 additions and 9 deletions
|
@ -71,9 +71,11 @@ void setSimId(EntityItemProperties& propertiesWithSimID, EntityItem* entity) {
|
|||
propertiesWithSimID.containsPositionChange()) {
|
||||
propertiesWithSimID.setSimulatorID(myNodeID);
|
||||
entity->setSimulatorID(myNodeID);
|
||||
qDebug() << "script claiming ownership";
|
||||
} else if (entity->getSimulatorID() == myNodeID) {
|
||||
propertiesWithSimID.setSimulatorID(QUuid()); // give up simulation ownership
|
||||
entity->setSimulatorID(QUuid());
|
||||
qDebug() << "script releasing ownership";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -399,15 +399,6 @@ void PhysicsEngine::computeCollisionEvents() {
|
|||
// the manifold has up to 4 distinct points, but only extract info from the first
|
||||
_contactMap[ContactKey(a, b)].update(_numContactFrames, contactManifold->getContactPoint(0), _originOffset);
|
||||
|
||||
// if our character capsule is colliding with something dynamic, claim simulation ownership.
|
||||
// see EntityMotionState::sendUpdate
|
||||
// if (objectA == characterCollisionObject && !objectB->isStaticOrKinematicObject() && b) {
|
||||
// entityB->setShouldClaimSimulationOwnership(true);
|
||||
// }
|
||||
// if (objectB == characterCollisionObject && !objectA->isStaticOrKinematicObject() && a) {
|
||||
// entityA->setShouldClaimSimulationOwnership(true);
|
||||
// }
|
||||
|
||||
// collisions cause infections spread of simulation-ownership. we also attempt to take
|
||||
// ownership of anything that collides with our avatar.
|
||||
if (entityA && entityB &&
|
||||
|
@ -417,11 +408,13 @@ void PhysicsEngine::computeCollisionEvents() {
|
|||
entityA->getShouldClaimSimulationOwnership() ||
|
||||
objectA == characterCollisionObject) {
|
||||
entityB->setShouldClaimSimulationOwnership(true);
|
||||
qDebug() << "collision claiming ownership";
|
||||
}
|
||||
if (entityB->getSimulatorID() == myNodeID ||
|
||||
entityB->getShouldClaimSimulationOwnership() ||
|
||||
objectB == characterCollisionObject) {
|
||||
entityA->setShouldClaimSimulationOwnership(true);
|
||||
qDebug() << "collision claiming ownership";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue