mirror of https://github.com/OpenTTD/OpenTTD
Change: [Script] Start GS (but don't run it) when generating world in scenario editor (#13961)
parent
8846f347f2
commit
f35fa6679b
|
@ -166,6 +166,8 @@ static void _GenerateWorld()
|
||||||
StartupDisasters();
|
StartupDisasters();
|
||||||
_generating_world = false;
|
_generating_world = false;
|
||||||
|
|
||||||
|
Game::StartNew();
|
||||||
|
|
||||||
/* No need to run the tile loop in the scenario editor. */
|
/* No need to run the tile loop in the scenario editor. */
|
||||||
if (GenWorldInfo::mode != GWM_EMPTY) {
|
if (GenWorldInfo::mode != GWM_EMPTY) {
|
||||||
uint i;
|
uint i;
|
||||||
|
@ -178,8 +180,6 @@ static void _GenerateWorld()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_game_mode != GM_EDITOR) {
|
if (_game_mode != GM_EDITOR) {
|
||||||
Game::StartNew();
|
|
||||||
|
|
||||||
if (Game::GetInstance() != nullptr) {
|
if (Game::GetInstance() != nullptr) {
|
||||||
SetGeneratingWorldProgress(GWP_RUNSCRIPT, 2500);
|
SetGeneratingWorldProgress(GWP_RUNSCRIPT, 2500);
|
||||||
_generating_world = true;
|
_generating_world = true;
|
||||||
|
|
Loading…
Reference in New Issue