1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 01:12:39 +01:00

Fix ff08a22: script configs were cleared by AIPL and GSDT chunks from intro game (#14910)

This commit is contained in:
Loïc Guilloux
2025-12-14 17:07:19 +01:00
committed by GitHub
parent 5e2df6d028
commit 7b69a0b7fa
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
{
assert(company < MAX_COMPANIES);
if (_game_mode == GM_MENU) source = SSS_FORCE_NEWGAME;
if (source == SSS_DEFAULT && _game_mode == GM_MENU) source = SSS_FORCE_NEWGAME;
if (source == SSS_DEFAULT) {
Company *c = Company::GetIfValid(company);

View File

@@ -17,7 +17,7 @@
/* static */ GameConfig *GameConfig::GetConfig(ScriptSettingSource source)
{
if (_game_mode == GM_MENU) source = SSS_FORCE_NEWGAME;
if (source == SSS_DEFAULT && _game_mode == GM_MENU) source = SSS_FORCE_NEWGAME;
auto &config = (source == SSS_FORCE_NEWGAME) ? _settings_newgame.script_config.game : _settings_game.script_config.game;
if (config == nullptr) config = std::make_unique<GameConfig>();