mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-16 13:58:22 +00:00
Feature flag all logic
This commit is contained in:
+11
-9
@@ -12968,15 +12968,17 @@ void Client::CheckSendBulkClientPositionUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// if we have seen this mob before and it hasn't moved, skip it
|
||||
if (m_last_seen_mob_position.contains(mob->GetID())) {
|
||||
if (m_last_seen_mob_position[mob->GetID()] == mob->GetPosition()) {
|
||||
LogVisibilityDetail(
|
||||
"Mob [{}] has already been sent to client [{}] at this position, skipping",
|
||||
mob->GetCleanName(),
|
||||
GetCleanName()
|
||||
);
|
||||
continue;
|
||||
// if we have seen this mob before, and it hasn't moved, skip it
|
||||
if (RuleB(Zone, AkkadiusTempPerformanceFeatureFlag)) {
|
||||
if (m_last_seen_mob_position.contains(mob->GetID())) {
|
||||
if (m_last_seen_mob_position[mob->GetID()] == mob->GetPosition()) {
|
||||
LogVisibilityDetail(
|
||||
"Mob [{}] has already been sent to client [{}] at this position, skipping",
|
||||
mob->GetCleanName(),
|
||||
GetCleanName()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -971,7 +971,9 @@ void Client::CompleteConnect()
|
||||
RecordStats();
|
||||
AutoGrantAAPoints();
|
||||
|
||||
m_last_seen_mob_position.reserve(entity_list.GetMobList().size());
|
||||
if (RuleB(Zone, AkkadiusTempPerformanceFeatureFlag)) {
|
||||
m_last_seen_mob_position.reserve(entity_list.GetMobList().size());
|
||||
}
|
||||
|
||||
// enforce some rules..
|
||||
if (!CanEnterZone()) {
|
||||
|
||||
@@ -122,7 +122,11 @@ bool Client::Process() {
|
||||
|
||||
/* I haven't naturally updated my position in 10 seconds, updating manually */
|
||||
if (!IsMoving() && m_position_update_timer.Check()) {
|
||||
CastToClient()->BroadcastPositionUpdate();
|
||||
if (RuleB(Zone, AkkadiusTempPerformanceFeatureFlag)) {
|
||||
CastToClient()->BroadcastPositionUpdate();
|
||||
} else {
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (mana_timer.Check())
|
||||
@@ -285,7 +289,7 @@ bool Client::Process() {
|
||||
entity_list.ScanCloseMobs(this);
|
||||
}
|
||||
|
||||
if (m_see_close_mobs_timer.Check()) {
|
||||
if (m_see_close_mobs_timer.Check() && RuleB(Zone, AkkadiusTempPerformanceFeatureFlag)) {
|
||||
entity_list.UpdateVisibility(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -2871,6 +2871,7 @@ bool EntityList::RemoveMobFromCloseLists(Mob *mob)
|
||||
it->second->m_close_mobs.erase(entity_id);
|
||||
it->second->m_can_see_mob.erase(entity_id);
|
||||
it->second->m_last_seen_mob_position.erase(entity_id);
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
|
||||
@@ -852,7 +852,9 @@ void MobMovementManager::SendCommandToClients(
|
||||
}
|
||||
|
||||
c->QueuePacket(&outapp, false);
|
||||
c->m_last_seen_mob_position[mob->GetID()] = mob->GetPosition();
|
||||
if (RuleB(Zone, AkkadiusTempPerformanceFeatureFlag)) {
|
||||
c->m_last_seen_mob_position[mob->GetID()] = mob->GetPosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -903,7 +905,9 @@ void MobMovementManager::SendCommandToClients(
|
||||
}
|
||||
|
||||
c->QueuePacket(&outapp, false);
|
||||
c->m_last_seen_mob_position[mob->GetID()] = mob->GetPosition();
|
||||
if (RuleB(Zone, AkkadiusTempPerformanceFeatureFlag)) {
|
||||
c->m_last_seen_mob_position[mob->GetID()] = mob->GetPosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user