chore: use ranges in EntityManager and touch up (#1451)

* EntityManager: ranges and cleanup

Use LWOOBJID for ghosting entities
use ranges::views::values for associative container iteration
remove dead code
comment magic numbers
little bit of optimization (not enough to be game changing or take the time to measure, they are free speedups anyways, we take those)
use cstdint types

* use size_t

* use lwoobjid for ghost candidate
This commit is contained in:
David Markowitz
2024-02-11 12:28:25 -08:00
committed by GitHub
parent ddaac276fe
commit dfb2fd93b4
4 changed files with 66 additions and 97 deletions

View File

@@ -50,14 +50,12 @@ public:
void DestructAllEntities(const SystemAddress& sysAddr);
void SetGhostDistanceMax(float value);
float GetGhostDistanceMax() const;
void SetGhostDistanceMin(float value);
float GetGhostDistanceMin() const;
void QueueGhostUpdate(LWOOBJID playerID);
void UpdateGhosting();
void UpdateGhosting(Entity* player);
void CheckGhosting(Entity* entity);
Entity* GetGhostCandidate(int32_t id);
Entity* GetGhostCandidate(LWOOBJID id) const;
bool GetGhostingEnabled() const;
void ScheduleForKill(Entity* entity);