mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
Feature flag all logic
This commit is contained in:
parent
6424e6a3f3
commit
2d8ef8d286
@ -373,6 +373,7 @@ RULE_BOOL(Zone, AllowCrossZoneSpellsOnBots, false, "Set to true to allow cross z
|
||||
RULE_BOOL(Zone, AllowCrossZoneSpellsOnMercs, false, "Set to true to allow cross zone spells (cast/remove) to affect mercenaries")
|
||||
RULE_BOOL(Zone, AllowCrossZoneSpellsOnPets, false, "Set to true to allow cross zone spells (cast/remove) to affect pets")
|
||||
RULE_BOOL(Zone, ZoneShardQuestMenuOnly, false, "Set to true if you only want quests to show the zone shard menu")
|
||||
RULE_BOOL(Zone, AkkadiusTempPerformanceFeatureFlag, true, "Enable or disable the Akkadius Temp Performance Feature Flag")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Map)
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user