mirror of https://github.com/OpenTTD/OpenTTD
(svn r15383) -Cleanup: Don't call MakeNewgameSettingsLive more often than necessary.
parent
4cc07196ac
commit
4301278514
|
@ -248,8 +248,8 @@ void StartGeneratingLandscape(glwp_modes mode)
|
||||||
{
|
{
|
||||||
DeleteAllNonVitalWindows();
|
DeleteAllNonVitalWindows();
|
||||||
|
|
||||||
/* Copy all XXX_newgame to XXX when coming from outside the editor */
|
/* Copy the settings needed for creating a new map. */
|
||||||
MakeNewgameSettingsLive();
|
_settings_game.game_creation = _settings_newgame.game_creation;
|
||||||
ResetGRFConfig(true);
|
ResetGRFConfig(true);
|
||||||
|
|
||||||
SndPlayFx(SND_15_BEEP);
|
SndPlayFx(SND_15_BEEP);
|
||||||
|
@ -441,8 +441,6 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GLAND_GENERATE_BUTTON: // Generate
|
case GLAND_GENERATE_BUTTON: // Generate
|
||||||
MakeNewgameSettingsLive();
|
|
||||||
|
|
||||||
if (mode == GLWP_HEIGHTMAP &&
|
if (mode == GLWP_HEIGHTMAP &&
|
||||||
(this->x * 2 < (1U << _settings_newgame.game_creation.map_x) ||
|
(this->x * 2 < (1U << _settings_newgame.game_creation.map_x) ||
|
||||||
this->x / 2 > (1U << _settings_newgame.game_creation.map_x) ||
|
this->x / 2 > (1U << _settings_newgame.game_creation.map_x) ||
|
||||||
|
|
|
@ -661,8 +661,8 @@ int ttd_main(int argc, char *argv[])
|
||||||
/* XXX - ugly hack, if diff_level is 9, it means we got no setting from the config file */
|
/* XXX - ugly hack, if diff_level is 9, it means we got no setting from the config file */
|
||||||
if (_settings_newgame.difficulty.diff_level == 9) SetDifficultyLevel(0, &_settings_newgame.difficulty);
|
if (_settings_newgame.difficulty.diff_level == 9) SetDifficultyLevel(0, &_settings_newgame.difficulty);
|
||||||
|
|
||||||
/* Make sure _settings is filled with _settings_newgame if we switch to a game directly */
|
/* Copy the settings needed for creating a new map. */
|
||||||
if (_switch_mode != SM_NONE) MakeNewgameSettingsLive();
|
_settings_game.game_creation = _settings_newgame.game_creation;
|
||||||
|
|
||||||
/* initialize the ingame console */
|
/* initialize the ingame console */
|
||||||
IConsoleInit();
|
IConsoleInit();
|
||||||
|
|
Loading…
Reference in New Issue