diff --git a/dGame/EntityManager.cpp b/dGame/EntityManager.cpp index 3dde2d53..36eabb63 100644 --- a/dGame/EntityManager.cpp +++ b/dGame/EntityManager.cpp @@ -129,6 +129,8 @@ Entity* EntityManager::CreateEntity(EntityInfo info, User* user, Entity* parentE // Set the zone control entity if the entity is a zone control object, this should only happen once if (controller) { m_ZoneControlEntity = entity; + // Proooooobably shouldn't ghost zoneControl + m_ZoneControlEntity->SetIsGhostingCandidate(false); } // Check if this entity is a respawn point, if so add it to the registry @@ -394,7 +396,7 @@ void EntityManager::ConstructAllEntities(const SystemAddress& sysAddr) { } } - UpdateGhosting(PlayerManager::GetPlayer(sysAddr), true); + UpdateGhosting(PlayerManager::GetPlayer(sysAddr)); } void EntityManager::DestructEntity(Entity* entity, const SystemAddress& sysAddr) { @@ -463,7 +465,7 @@ void EntityManager::UpdateGhosting() { m_PlayersToUpdateGhosting.clear(); } -void EntityManager::UpdateGhosting(Entity* player, const bool constructAll) { +void EntityManager::UpdateGhosting(Entity* player) { if (!player) return; auto* missionComponent = player->GetComponent(); @@ -513,9 +515,6 @@ void EntityManager::UpdateGhosting(Entity* player, const bool constructAll) { entity->SetObservers(entity->GetObservers() + 1); - // TODO: figure out if zone control should be ghosted at all - if (constructAll && entity->GetObjectID() == GetZoneControlEntity()->GetObjectID()) continue; - ConstructEntity(entity, player->GetSystemAddress()); } } diff --git a/dGame/EntityManager.h b/dGame/EntityManager.h index 780a7c2c..3ea97676 100644 --- a/dGame/EntityManager.h +++ b/dGame/EntityManager.h @@ -58,7 +58,7 @@ public: void SetGhostDistanceMin(float value); void QueueGhostUpdate(LWOOBJID playerID); void UpdateGhosting(); - void UpdateGhosting(Entity* player, const bool constructAll = false); + void UpdateGhosting(Entity* player); void CheckGhosting(Entity* entity); Entity* GetGhostCandidate(LWOOBJID id) const; bool GetGhostingEnabled() const;