improved check to avoid unresponsive BG/arena bot, and removed possibility of battleground strat crashing server when in wrong BG

This commit is contained in:
Fuzz
2024-07-04 18:09:47 +10:00
parent 08cbe2f4ec
commit 718f90c4e9
2 changed files with 12 additions and 5 deletions

View File

@@ -2609,7 +2609,7 @@ bool BGTactics::Execute(Event event)
if (bg->isArena())
{
// can't use this in arena - it will crash server wehen vPaths/vFlagIds are used uninitialized
// can't use this in arena - no vPaths/vFlagIds (will crash server)
botAI->ResetStrategies();
return false;
}
@@ -2656,6 +2656,9 @@ bool BGTactics::Execute(Event event)
break;
}
default:
// can't use this in this BG - no vPaths/vFlagIds (will crash server)
botAI->ResetStrategies();
return false;
break;
}