changeset 18844:dc8ff68830a9 draft

(svn r23693) -Fix [FS#4859]: hardcode the original defaults for loading old savegames if they could totally mess with the game's behaviour
author rubidium <rubidium@openttd.org>
date Sat, 31 Dec 2011 13:52:54 +0000
parents 2bbb44275f50
children 6d8f101888d5
files src/saveload/afterload.cpp
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -634,8 +634,22 @@
 	 * must be done before loading sprites as some newgrfs check it */
 	SetDate(_date, _date_fract);
 
-	/* Force dynamic engines off when loading older savegames */
-	if (IsSavegameVersionBefore(95)) _settings_game.vehicle.dynamic_engines = 0;
+	/*
+	 * Force the old behaviour for compatability reasons with old savegames.
+	 *
+	 * Note that there is no non-stop in here. This is because the setting could have
+	 * either value in TTDPatch. To convert it properly the user has to make sure the
+	 * right value has been chosen in the settings. Otherwise we will be converting
+	 * it incorrectly in half of the times without a means to correct that.
+	 */
+	if (IsSavegameVersionBefore(4, 2)) _settings_game.station.modified_catchment = false;
+	if (IsSavegameVersionBefore(6, 1)) _settings_game.station.forbid_90_deg = false;
+	if (IsSavegameVersionBefore(21))   _settings_game.vehicle.train_acceleration_model = 0;
+	if (IsSavegameVersionBefore(90))   _settings_game.vehicle.plane_speed = 4;
+	if (IsSavegameVersionBefore(95))   _settings_game.vehicle.dynamic_engines = 0;
+	if (IsSavegameVersionBefore(133))  _settings_game.vehicle.roadveh_acceleration_model = 0;
+	if (IsSavegameVersionBefore(159))  _settings_game.vehicle.max_train_length = 50;
+	if (IsSavegameVersionBefore(166))  _settings_game.economy.infrastructure_maintenance = false;
 
 	/* Load the sprites */
 	GfxLoadSprites();