forked from mirror/OpenTTD
(svn r22626) -Fix [FS#4622]: Also initialise _old_vds with newgame settings; TTD savegames do not contain these settings.
This commit is contained in:
@@ -314,7 +314,10 @@ void MakeNewgameSettingsLive()
|
|||||||
}
|
}
|
||||||
#endif /* ENABLE_AI */
|
#endif /* ENABLE_AI */
|
||||||
|
|
||||||
|
/* Copy newgame settings to active settings.
|
||||||
|
* Also initialise old settings needed for savegame conversion. */
|
||||||
_settings_game = _settings_newgame;
|
_settings_game = _settings_newgame;
|
||||||
|
_old_vds = _settings_client.company.vehicle;
|
||||||
|
|
||||||
#ifdef ENABLE_AI
|
#ifdef ENABLE_AI
|
||||||
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
|
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
|
||||||
|
@@ -93,6 +93,4 @@ bool SetSettingValue(uint index, int32 value, bool force_newgame = false);
|
|||||||
bool SetSettingValue(uint index, const char *value, bool force_newgame = false);
|
bool SetSettingValue(uint index, const char *value, bool force_newgame = false);
|
||||||
void SetCompanySetting(uint index, int32 value);
|
void SetCompanySetting(uint index, int32 value);
|
||||||
|
|
||||||
extern VehicleDefaultSettings _old_vds;
|
|
||||||
|
|
||||||
#endif /* SETTINGS_INTERNAL_H */
|
#endif /* SETTINGS_INTERNAL_H */
|
||||||
|
@@ -465,6 +465,9 @@ extern GameSettings _settings_game;
|
|||||||
/** The settings values that are used for new games and/or modified in config file. */
|
/** The settings values that are used for new games and/or modified in config file. */
|
||||||
extern GameSettings _settings_newgame;
|
extern GameSettings _settings_newgame;
|
||||||
|
|
||||||
|
/** Old vehicle settings, which were game settings before, and are company settings now. (Needed for savegame conversion) */
|
||||||
|
extern VehicleDefaultSettings _old_vds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the settings-object applicable for the current situation: the newgame settings
|
* Get the settings-object applicable for the current situation: the newgame settings
|
||||||
* when we're in the main menu and otherwise the settings of the current game.
|
* when we're in the main menu and otherwise the settings of the current game.
|
||||||
|
Reference in New Issue
Block a user