[Performance] Improvements to ScanCloseMobs logic (#4534)

* [Performance] Minor improvements to ScanCloseMobs

* Remove timer checks one level up to reduce branching

* Reserve memory in m_close_mobs to avoid frequent re-allocations if not already reserved.
This commit is contained in:
Chris Miles authored and GitHub committed 2024-11-08 17:48:39 -06:00
1 parent 1ce51ca3b0
commit 0ea47fadee
7 files changed
+42 -47

No files matched your search

-1
View File
@@ -1488,7 +1488,6 @@ public:
bool IsCloseToBanker();
void ScanCloseMobProcess();
std::unordered_map<uint16, Mob *> &GetCloseMobList(float distance = 0.0f);
void CheckScanCloseMobsMovingTimer();