1
0
Fork 0

Fix #10486: [Script] Debug window requires AIs to be started before GS (#10487)

pull/10628/head
Loïc Guilloux 2023-02-17 12:24:51 +01:00 committed by rubidium42
parent 617d794af6
commit 0604f571e1
1 changed files with 4 additions and 2 deletions

View File

@ -542,14 +542,16 @@ static inline bool MayHaveBridgeAbove(TileIndex t)
*/
static void StartScripts()
{
/* Start the GameScript. */
Game::StartNew();
/* Script debug window requires AIs to be started before trying to start GameScript. */
/* Start the AIs. */
for (const Company *c : Company::Iterate()) {
if (Company::IsValidAiID(c->index)) AI::StartNew(c->index, false);
}
/* Start the GameScript. */
Game::StartNew();
ShowAIDebugWindowIfAIError();
}