mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r15500) -Fix (r12648): pre-0.5 OTTD stored new_nonstop and full_load_any in a different way, savegame conversion wasn't working for them
This commit is contained in:
parent
91d6c1bb31
commit
b83b58dd54
@ -14,8 +14,8 @@ void Order::ConvertFromOldSavegame()
|
||||
uint8 old_flags = this->flags;
|
||||
this->flags = 0;
|
||||
|
||||
/* First handle non-stop */
|
||||
if (_settings_client.gui.sg_new_nonstop) {
|
||||
/* First handle non-stop - use value from savegame if possible, else use value from config file */
|
||||
if (_settings_client.gui.sg_new_nonstop || (CheckSavegameVersion(22) && _settings_client.gui.new_nonstop)) {
|
||||
/* OFB_NON_STOP */
|
||||
this->SetNonStopType((old_flags & 8) ? ONSF_NO_STOP_AT_ANY_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
|
||||
} else {
|
||||
@ -35,7 +35,8 @@ void Order::ConvertFromOldSavegame()
|
||||
} else if ((old_flags & 4) == 0) { // !OFB_FULL_LOAD
|
||||
this->SetLoadType(OLF_LOAD_IF_POSSIBLE);
|
||||
} else {
|
||||
this->SetLoadType(_settings_client.gui.sg_full_load_any ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD);
|
||||
/* old OTTD versions stored full_load_any in config file - assume it was enabled when loading */
|
||||
this->SetLoadType(_settings_client.gui.sg_full_load_any || CheckSavegameVersion(22) ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD);
|
||||
}
|
||||
|
||||
/* Finally fix the unload flags */
|
||||
|
@ -1348,10 +1348,10 @@ const SettingDesc _settings[] = {
|
||||
SDT_CONDBOOL(GameSettings, vehicle.dynamic_engines, 95, SL_MAX_VERSION, 0,NN, false, STR_CONFIG_SETTING_DYNAMIC_ENGINES, NULL),
|
||||
|
||||
SDT_BOOL(GameSettings, station.join_stations, 0, 0, true, STR_CONFIG_SETTING_JOINSTATIONS, NULL),
|
||||
SDTC_CONDBOOL( gui.sg_full_load_any, 0, 92, 0, 0 , true, STR_NULL, NULL),
|
||||
SDTC_CONDBOOL( gui.sg_full_load_any, 22, 92, 0, 0, true, STR_NULL, NULL),
|
||||
SDT_BOOL(GameSettings, order.improved_load, 0,NN, true, STR_CONFIG_SETTING_IMPROVEDLOAD, NULL),
|
||||
SDT_BOOL(GameSettings, order.selectgoods, 0, 0, true, STR_CONFIG_SETTING_SELECTGOODS, NULL),
|
||||
SDTC_CONDBOOL( gui.sg_new_nonstop, 0, 92, 0, 0, false, STR_NULL, NULL),
|
||||
SDTC_CONDBOOL( gui.sg_new_nonstop, 22, 92, 0, 0, false, STR_NULL, NULL),
|
||||
SDT_BOOL(GameSettings, station.nonuniform_stations, 0,NN, true, STR_CONFIG_SETTING_NONUNIFORM_STATIONS, NULL),
|
||||
SDT_VAR(GameSettings, station.station_spread, SLE_UINT8, 0, 0, 12, 4, 64, 0, STR_CONFIG_SETTING_STATION_SPREAD, InvalidateStationBuildWindow),
|
||||
SDT_BOOL(GameSettings, order.serviceathelipad, 0, 0, true, STR_CONFIG_SETTING_SERVICEATHELIPAD, NULL),
|
||||
|
Loading…
Reference in New Issue
Block a user