From 6dddab7c1a8e6c1c6e747eb63b31e38c580568ef Mon Sep 17 00:00:00 2001 From: Fuzz Date: Wed, 26 Jun 2024 17:28:50 +1000 Subject: [PATCH] [Misc] fixed dead code, unused variables other merge errors introduced by commit 3879b5116e344469b33d60e05bb7ad05a27cfe7f --- .../actions/BattleGroundJoinAction.cpp | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/strategy/actions/BattleGroundJoinAction.cpp b/src/strategy/actions/BattleGroundJoinAction.cpp index e64a2567..05ca2796 100644 --- a/src/strategy/actions/BattleGroundJoinAction.cpp +++ b/src/strategy/actions/BattleGroundJoinAction.cpp @@ -250,30 +250,13 @@ bool BGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battlegroun bool hasBots = (sRandomPlayerbotMgr->BgBots[queueTypeId][bracketId][TEAM_ALLIANCE] + sRandomPlayerbotMgr->BgBots[queueTypeId][bracketId][TEAM_HORDE]) >= bg->GetMinPlayersPerTeam(); if (!sPlayerbotAIConfig->randomBotAutoJoinBG && !hasPlayers) - { return false; - if (sPlayerbotAIConfig->enablePrototypePerformanceDiff) - { - if (!noLag) - { - return false; - } - } - } - - if (!hasPlayers && !(isArena)) - { + if (!(hasPlayers || hasBots)) return false; - if (sPlayerbotAIConfig->enablePrototypePerformanceDiff) - { - if (!noLag) - { - return false; - } - } - } + if (sPlayerbotAIConfig->enablePrototypePerformanceDiff && !hasPlayers && !noLag) + return false; uint32 BracketSize = bg->GetMaxPlayersPerTeam() * 2; uint32 TeamSize = bg->GetMaxPlayersPerTeam(); @@ -607,7 +590,6 @@ bool FreeBGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battleg bool isArena = false; bool isRated = false; - bool noLag = sWorldUpdateTime.GetAverageUpdateTime() < (sRandomPlayerbotMgr->GetPlayers().empty() ? sPlayerbotAIConfig->diffEmpty : sPlayerbotAIConfig->diffWithPlayer) * 1.1; ArenaType type = ArenaType(BattlegroundMgr::BGArenaType(queueTypeId)); if (type != ARENA_TYPE_NONE)