mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[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:
+11
-1
@@ -971,6 +971,16 @@ void Client::CompleteConnect()
|
||||
RecordStats();
|
||||
AutoGrantAAPoints();
|
||||
|
||||
// set initial position for mob tracking
|
||||
m_last_seen_mob_position.reserve(entity_list.GetMobList().size());
|
||||
for (auto& mob : entity_list.GetMobList()) {
|
||||
if (!mob.second->IsNPC()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
m_last_seen_mob_position[mob.second->GetID()] = mob.second->GetPosition();
|
||||
}
|
||||
|
||||
// enforce some rules..
|
||||
if (!CanEnterZone()) {
|
||||
LogInfo("Kicking character [{}] from zone, not allowed here (missing requirements)", GetCleanName());
|
||||
@@ -4956,7 +4966,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
||||
CheckScanCloseMobsMovingTimer();
|
||||
}
|
||||
|
||||
CheckSendBulkClientPositionUpdate();
|
||||
CheckSendBulkNpcPositions();
|
||||
|
||||
int32 new_animation = ppu->animation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user