Fix #9722: create vital windows as soon as local_company is set (#11858)

Many places use local_company to detect whether world generation is
done, and blindly assume all vital windows exists when local_company
is set.

(cherry picked from commit f35e257adc)
pull/642/head
Patric Stout 4 months ago committed by Jonathan G Rennison
parent 90859fbe25
commit e1673d5635

@ -77,8 +77,6 @@ static void CleanupGeneration()
_town_noise_no_update = false;
SetMouseCursorBusy(false);
/* Show all vital windows again, because we have hidden them */
if (_game_mode != GM_MENU) ShowVitalWindows();
SetModalProgress(false);
_gw.proc = nullptr;
_gw.abortp = nullptr;
@ -196,6 +194,8 @@ static void _GenerateWorld()
ResetObjectToPlace();
_cur_company.Trash();
_current_company = _local_company = _gw.lc;
/* Show all vital windows again, because we have hidden them. */
if (_game_mode != GM_MENU) ShowVitalWindows();
SetGeneratingWorldProgress(GWP_GAME_START, 1);
/* Call any callback */

Loading…
Cancel
Save