Revert "Rewrote scaling, moving away from cmangos solutions"

This reverts commit 62aef235d1.
This commit is contained in:
bash
2024-10-17 17:52:05 +00:00
parent ca9bfc4b9c
commit 12be2c9971
8 changed files with 113 additions and 90 deletions

View File

@@ -234,9 +234,17 @@ bool BGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battlegroun
return false;
TeamId teamId = bot->GetTeamId();
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->botActiveAloneSmartScale && !noLag)
return false;
// If the bot is in a group, only the leader can queue
if (bot->GetGroup() && !bot->GetGroup()->IsLeader(bot->GetGUID()))
return false;
@@ -569,10 +577,17 @@ bool FreeBGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battleg
return false;
TeamId teamId = bot->GetTeamId();
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->botActiveAloneSmartScale && !noLag)
return false;
// If the bot is in a group, only the leader can queue
if (bot->GetGroup() && !bot->GetGroup()->IsLeader(bot->GetGUID()))
return false;