From fee10259825fa9a603073692e4c90c0300808005 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Sun, 25 Jun 2023 21:05:25 -0700 Subject: [PATCH] Remove commented out logic, add ghosting exclusion We dont create items that are in an inventory, so that path is pointless for us. --- dGame/dEntity/Entity.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dGame/dEntity/Entity.cpp b/dGame/dEntity/Entity.cpp index 6d902f94..cd0c0276 100644 --- a/dGame/dEntity/Entity.cpp +++ b/dGame/dEntity/Entity.cpp @@ -310,6 +310,7 @@ void Entity::Initialize() { break; case eReplicaComponentType::MOVING_PLATFORM: AddComponent(GetVarAsString(u"attached_path")); + m_IsGhostingCandidate = false; break; case eReplicaComponentType::PET: AddComponent(componentId); @@ -325,6 +326,7 @@ void Entity::Initialize() { havokVehiclePhysicsComponent->SetRotation(m_DefaultRotation); } } + m_IsGhostingCandidate = false; hasPhysicsComponent = true; break; } @@ -333,14 +335,17 @@ void Entity::Initialize() { break; case eReplicaComponentType::PROPERTY: AddComponent(); + m_IsGhostingCandidate = false; break; case eReplicaComponentType::SCRIPTED_ACTIVITY: AddComponent(componentId); + m_IsGhostingCandidate = false; break; case eReplicaComponentType::PHANTOM_PHYSICS: { auto* phantomPhysicsComponent = AddComponent(); if (phantomPhysicsComponent) phantomPhysicsComponent->SetPhysicsEffectActive(false); hasPhysicsComponent = true; + m_IsGhostingCandidate = false; break; } case eReplicaComponentType::MODEL_BEHAVIOR: { @@ -359,9 +364,6 @@ void Entity::Initialize() { hasPhysicsComponent = true; } } - // if has LDF of propertyObjectID || inInventory is true - // AddComponent(); - // else AddComponent(); if (!HasComponent(eReplicaComponentType::DESTROYABLE)) { auto* destroyableComponent = AddComponent(componentId); @@ -417,6 +419,7 @@ void Entity::Initialize() { break; case eReplicaComponentType::RACING_CONTROL: AddComponent(); + m_IsGhostingCandidate = false; break; case eReplicaComponentType::MISSION_OFFER: AddComponent(GetLOT());