Clear rail ageing data on load.

This commit is contained in:
Jonathan G Rennison
2015-08-19 19:09:25 +01:00
parent 96ccd9333a
commit 88d45e5e2c
3 changed files with 11 additions and 0 deletions

View File

@@ -3152,6 +3152,15 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeaturePresent(XSLFI_RAIL_AGEING)) {
/* remove rail aging data */
for (TileIndex t = 0; t < map_size; t++) {
if (IsPlainRailTile(t)) {
SB(_me[t].m7, 0, 8, 0);
}
}
}
/* Station acceptance is some kind of cache */
if (IsSavegameVersionBefore(127)) {
Station *st;

View File

@@ -162,6 +162,7 @@ void SlXvCheckSpecialSavegameVersions()
_sl_xv_feature_versions[XSLFI_HEIGHT_8_BIT] = 1;
_sl_xv_feature_versions[XSLFI_MIGHT_USE_PAX_SIGNALS] = 1;
_sl_xv_feature_versions[XSLFI_TRAFFIC_LIGHTS] = 1;
_sl_xv_feature_versions[XSLFI_RAIL_AGEING] = 1;
_sl_xv_feature_versions[XSLFI_TIMETABLES_START_TICKS] = 1;
_sl_xv_feature_versions[XSLFI_VEHICLE_REPAIR_COST] = 1;

View File

@@ -41,6 +41,7 @@ enum SlXvFeatureIndex {
XSLFI_HEIGHT_8_BIT, ///< Map tile height is 8 bit instead of 4 bit, but savegame version may be before this became true in trunk
XSLFI_MIGHT_USE_PAX_SIGNALS, ///< This save game might use the pax-signals feature
XSLFI_TRAFFIC_LIGHTS, ///< This save game uses road traffic lights
XSLFI_RAIL_AGEING, ///< This save game uses the rail aging patch
XSLFI_SPRINGPP, ///< This is a SpringPP game, use this for loading some settings
XSLFI_SIZE, ///< Total count of features, including null feature