[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 -2
View File
@@ -7378,15 +7378,17 @@ void Mob::SetHP(int64 hp)
void Mob::DrawDebugCoordinateNode(std::string node_name, const glm::vec4 vec)
{
NPC *node = nullptr;
NPC *node = nullptr;
for (const auto &n: entity_list.GetNPCList()) {
if (n.second->GetCleanName() == node_name) {
if (n.second->GetEntityVariable("node_parent_id") == std::to_string(GetID())) {
node = n.second;
break;
}
}
if (!node) {
node = NPC::SpawnNodeNPC(node_name, "", GetPosition());
node->SetEntityVariable("node_parent_id", std::to_string(GetID()));
}
}