Fix #7151: Hang when concurrently starting AIs in multiplayer, or with shift pressed.

This commit is contained in:
2019-02-04 17:19:21 +00:00
committed by Niels Martin Hansen
parent 64878320cc
commit b1e40b6b56
3 changed files with 8 additions and 3 deletions

View File

@@ -724,6 +724,10 @@ void OnTick_Companies()
/* Allow multiple AIs to possibly start in the same tick. */
do {
if (!MaybeStartNewCompany()) break;
/* In networking mode, we can only send a command to start but it
* didn't execute yet, so we cannot loop. */
if (_networking) break;
} while (AI::GetStartNextTime() == 0);
}