mirror of
https://github.com/kadeshar/mod-player-bot-level-brackets.git
synced 2026-01-13 01:08:36 +00:00
Adding bot safety check
This commit is contained in:
@@ -554,17 +554,26 @@ static void ProcessPendingLevelResets()
|
||||
break;
|
||||
|
||||
Player* bot = it->bot;
|
||||
|
||||
if (!bot || !bot->IsInWorld())
|
||||
{
|
||||
it = g_PendingLevelResets.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
int targetRange = it->targetRange;
|
||||
if (g_IgnoreGuildBotsWithRealPlayers && BotInGuildWithRealPlayer(bot))
|
||||
{
|
||||
it = g_PendingLevelResets.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_IgnoreFriendListed && BotInFriendList(bot))
|
||||
{
|
||||
it = g_PendingLevelResets.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bot && bot->IsInWorld() && IsBotSafeForLevelReset(bot))
|
||||
{
|
||||
AdjustBotToRange(bot, targetRange, it->factionRanges);
|
||||
|
||||
Reference in New Issue
Block a user