Changeset - r28541:42e13f513738
[Not reviewed]
master
0 1 0
Patric Stout - 11 months ago 2024-01-21 17:36:33
truebrain@openttd.org
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.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/genworld.cpp
Show inline comments
 
@@ -72,8 +72,6 @@ static void CleanupGeneration()
 
	_generating_world = 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;
 
@@ -182,6 +180,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 */
0 comments (0 inline, 0 general)