mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:16:56 +02:00
cleanup
This commit is contained in:
parent
d6c8bd94cf
commit
23f1767634
1 changed files with 2 additions and 8 deletions
|
@ -371,8 +371,6 @@ void PhysicsEngine::computeCollisionEvents() {
|
||||||
|
|
||||||
const btCollisionObject* characterCollisionObject =
|
const btCollisionObject* characterCollisionObject =
|
||||||
_characterController ? _characterController->getCollisionObject() : NULL;
|
_characterController ? _characterController->getCollisionObject() : NULL;
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
|
||||||
const QUuid& myNodeID = nodeList->getSessionUUID();
|
|
||||||
|
|
||||||
// update all contacts every frame
|
// update all contacts every frame
|
||||||
int numManifolds = _collisionDispatcher->getNumManifolds();
|
int numManifolds = _collisionDispatcher->getNumManifolds();
|
||||||
|
@ -400,15 +398,11 @@ void PhysicsEngine::computeCollisionEvents() {
|
||||||
// see EntityMotionState::sendUpdate
|
// see EntityMotionState::sendUpdate
|
||||||
if (objectA == characterCollisionObject && !objectB->isStaticOrKinematicObject() && b) {
|
if (objectA == characterCollisionObject && !objectB->isStaticOrKinematicObject() && b) {
|
||||||
EntityItem* entityB = static_cast<EntityMotionState*>(b)->getEntity();
|
EntityItem* entityB = static_cast<EntityMotionState*>(b)->getEntity();
|
||||||
if (entityB->getSimulatorID() != myNodeID && !entityB->getShouldClaimSimulationOwnership()) {
|
entityB->setShouldClaimSimulationOwnership(true);
|
||||||
entityB->setShouldClaimSimulationOwnership(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (objectB == characterCollisionObject && !objectA->isStaticOrKinematicObject() && a) {
|
if (objectB == characterCollisionObject && !objectA->isStaticOrKinematicObject() && a) {
|
||||||
EntityItem* entityA = static_cast<EntityMotionState*>(a)->getEntity();
|
EntityItem* entityA = static_cast<EntityMotionState*>(a)->getEntity();
|
||||||
if (entityA->getSimulatorID() != myNodeID && !entityA->getShouldClaimSimulationOwnership()) {
|
entityA->setShouldClaimSimulationOwnership(true);
|
||||||
entityA->setShouldClaimSimulationOwnership(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue