mirror of
https://github.com/kadeshar/mod-player-bot-level-brackets.git
synced 2026-02-07 21:01:55 +00:00
Adding safety check to all branches
This commit is contained in:
@@ -976,6 +976,11 @@ public:
|
|||||||
while (allianceActualCounts[i] > allianceDesiredCounts[i] && !safeBots.empty())
|
while (allianceActualCounts[i] > allianceDesiredCounts[i] && !safeBots.empty())
|
||||||
{
|
{
|
||||||
Player* bot = safeBots.back();
|
Player* bot = safeBots.back();
|
||||||
|
if (!bot || !bot->IsInWorld())
|
||||||
|
{
|
||||||
|
it = safeBots.erase(it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
safeBots.pop_back();
|
safeBots.pop_back();
|
||||||
if (g_BotDistFullDebugMode)
|
if (g_BotDistFullDebugMode)
|
||||||
{
|
{
|
||||||
@@ -1041,6 +1046,11 @@ public:
|
|||||||
while (allianceActualCounts[i] > allianceDesiredCounts[i] && !flaggedBots.empty())
|
while (allianceActualCounts[i] > allianceDesiredCounts[i] && !flaggedBots.empty())
|
||||||
{
|
{
|
||||||
Player* bot = flaggedBots.back();
|
Player* bot = flaggedBots.back();
|
||||||
|
if (!bot || !bot->IsInWorld())
|
||||||
|
{
|
||||||
|
it = flaggedBots.erase(it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
flaggedBots.pop_back();
|
flaggedBots.pop_back();
|
||||||
if (g_BotDistFullDebugMode)
|
if (g_BotDistFullDebugMode)
|
||||||
{
|
{
|
||||||
@@ -1144,6 +1154,11 @@ public:
|
|||||||
while (hordeActualCounts[i] > hordeDesiredCounts[i] && !safeBots.empty())
|
while (hordeActualCounts[i] > hordeDesiredCounts[i] && !safeBots.empty())
|
||||||
{
|
{
|
||||||
Player* bot = safeBots.back();
|
Player* bot = safeBots.back();
|
||||||
|
if (!bot || !bot->IsInWorld())
|
||||||
|
{
|
||||||
|
it = safeBots.erase(it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
safeBots.pop_back();
|
safeBots.pop_back();
|
||||||
if (g_BotDistFullDebugMode)
|
if (g_BotDistFullDebugMode)
|
||||||
{
|
{
|
||||||
@@ -1209,6 +1224,11 @@ public:
|
|||||||
while (hordeActualCounts[i] > hordeDesiredCounts[i] && !flaggedBots.empty())
|
while (hordeActualCounts[i] > hordeDesiredCounts[i] && !flaggedBots.empty())
|
||||||
{
|
{
|
||||||
Player* bot = flaggedBots.back();
|
Player* bot = flaggedBots.back();
|
||||||
|
if (!bot || !bot->IsInWorld())
|
||||||
|
{
|
||||||
|
it = flaggedBots.erase(it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
flaggedBots.pop_back();
|
flaggedBots.pop_back();
|
||||||
if (g_BotDistFullDebugMode)
|
if (g_BotDistFullDebugMode)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user