mirror of
https://github.com/overte-org/overte.git
synced 2025-06-22 21:19:59 +02:00
Update conditional to handle 'other unowned' case
This commit is contained in:
parent
b86b07c08f
commit
f2fab57187
1 changed files with 2 additions and 2 deletions
|
@ -1108,7 +1108,7 @@ void EntityTreeRenderer::entityCollisionWithEntity(const EntityItemID& idA, cons
|
||||||
assert(!bothEntitiesStatic);
|
assert(!bothEntitiesStatic);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((myNodeID == entityASimulatorID && entityAIsDynamic) || (myNodeID == entityBSimulatorID && !entityAIsDynamic)) {
|
if ((myNodeID == entityASimulatorID && entityAIsDynamic) || (myNodeID == entityBSimulatorID && (!entityAIsDynamic || entityASimulatorID.isNull()))) {
|
||||||
playEntityCollisionSound(entityA, collision);
|
playEntityCollisionSound(entityA, collision);
|
||||||
emit collisionWithEntity(idA, idB, collision);
|
emit collisionWithEntity(idA, idB, collision);
|
||||||
if (_entitiesScriptEngine) {
|
if (_entitiesScriptEngine) {
|
||||||
|
@ -1116,7 +1116,7 @@ void EntityTreeRenderer::entityCollisionWithEntity(const EntityItemID& idA, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((myNodeID == entityBSimulatorID && entityBIsDynamic) || (myNodeID == entityASimulatorID && !entityBIsDynamic)) {
|
if ((myNodeID == entityBSimulatorID && entityBIsDynamic) || (myNodeID == entityASimulatorID && (!entityBIsDynamic || entityBSimulatorID.isNull()))) {
|
||||||
playEntityCollisionSound(entityB, collision);
|
playEntityCollisionSound(entityB, collision);
|
||||||
// since we're swapping A and B we need to send the inverted collision
|
// since we're swapping A and B we need to send the inverted collision
|
||||||
Collision invertedCollision(collision);
|
Collision invertedCollision(collision);
|
||||||
|
|
Loading…
Reference in a new issue