forked from mirror/OpenTTD
(svn r19395) -Fix [FS#3669]: the AI Debug window didn't open if an AI or library fails to compile when loading a savegame
This commit is contained in:
@@ -1024,3 +1024,15 @@ void InitializeAIGui()
|
||||
{
|
||||
AIDebugWindow::ai_debug_company = INVALID_COMPANY;
|
||||
}
|
||||
|
||||
/** Open the AI debug window if one of the AI scripts has crashed. */
|
||||
void ShowAIDebugWindowIfAIError()
|
||||
{
|
||||
Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
if (c->is_ai && c->ai_instance->IsDead()) {
|
||||
ShowAIDebugWindow(c->index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user