Autoscale latency modifier

This commit is contained in:
bash
2024-10-11 21:20:43 +00:00
parent c2b41dcff1
commit 158d923c15
5 changed files with 27 additions and 34 deletions

View File

@@ -234,16 +234,15 @@ bool BGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battlegroun
return false;
TeamId teamId = bot->GetTeamId();
bool noLag = sWorldUpdateTime.GetAverageUpdateTime() < (sRandomPlayerbotMgr->GetPlayers().empty()
? sPlayerbotAIConfig->diffEmpty
: sPlayerbotAIConfig->diffWithPlayer) *
1.1;
bool noLag = sWorldUpdateTime.GetAverageUpdateTime() < (sRandomPlayerbotMgr->GetPlayers().empty() ?
sPlayerbotAIConfig->botActiveAloneSmartScaleDiffEmpty :
sPlayerbotAIConfig->botActiveAloneSmartScaleDiffWithPlayer) * 1.1;
uint32 BracketSize = bg->GetMaxPlayersPerTeam() * 2;
uint32 TeamSize = bg->GetMaxPlayersPerTeam();
// If performance diff is enabled, only queue if there is no lag
if (sPlayerbotAIConfig->enablePrototypePerformanceDiff && !noLag)
if (sPlayerbotAIConfig->botActiveAloneSmartScale && !noLag)
return false;
// If the bot is in a group, only the leader can queue
@@ -578,16 +577,15 @@ bool FreeBGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battleg
return false;
TeamId teamId = bot->GetTeamId();
bool noLag = sWorldUpdateTime.GetAverageUpdateTime() < (sRandomPlayerbotMgr->GetPlayers().empty()
? sPlayerbotAIConfig->diffEmpty
: sPlayerbotAIConfig->diffWithPlayer) *
1.1;
bool noLag = sWorldUpdateTime.GetAverageUpdateTime() < (sRandomPlayerbotMgr->GetPlayers().empty() ?
sPlayerbotAIConfig->botActiveAloneSmartScaleDiffEmpty :
sPlayerbotAIConfig->botActiveAloneSmartScaleDiffWithPlayer) * 1.1;
uint32 BracketSize = bg->GetMaxPlayersPerTeam() * 2;
uint32 TeamSize = bg->GetMaxPlayersPerTeam();
// If performance diff is enabled, only queue if there is no lag
if (sPlayerbotAIConfig->enablePrototypePerformanceDiff && !noLag)
if (sPlayerbotAIConfig->botActiveAloneSmartScale && !noLag)
return false;
// If the bot is in a group, only the leader can queue