[Performance] Client / NPC Position Update Optimizations (#4602)

* Zone optimizations

* More changes

* More

* Update entity.cpp

* Beautiful

* Amazing

* Feature flag all logic

* Broadcast to group

* Update mob.cpp

* Updates

* Update client.cpp

* Update client.cpp

* Add rule Zone:EnableEntityClipping

* Little bit of cleanup

* Don't send update to self while in group

* Remove visibility work and feature flags

* Cleanup

* Logging

* Improve CheckSendBulkNpcPositions

* No need to cast

* Field cleanup

* Build initial list on zone-in
This commit is contained in:
Chris Miles
2025-01-21 15:35:19 -06:00
committed by GitHub
parent 1a27127c39
commit 25826c6686
24 changed files with 203 additions and 214 deletions
+4 -3
View File
@@ -129,6 +129,7 @@ Mob::Mob(
position_update_melee_push_timer(500),
hate_list_cleanup_timer(6000),
m_scan_close_mobs_timer(6000),
m_see_close_mobs_timer(1000),
m_mob_check_moving_timer(1000),
bot_attack_flag_timer(10000)
{
@@ -8612,15 +8613,15 @@ std::unordered_map<uint16, Mob *> &Mob::GetCloseMobList(float distance)
void Mob::ClearDataBucketCache()
{
if (IsOfClientBot()) {
uint64 id = 0;
uint64 id = 0;
DataBucketLoadType::Type t{};
if (IsBot()) {
id = CastToBot()->GetBotID();
t = DataBucketLoadType::Bot;
t = DataBucketLoadType::Bot;
}
else if (IsClient()) {
id = CastToClient()->CharacterID();
t = DataBucketLoadType::Client;
t = DataBucketLoadType::Client;
}
DataBucket::DeleteFromCache(id, t);