diff options
author | tron <tron@openttd.org> | 2007-01-31 06:25:46 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-31 06:25:46 +0000 |
commit | fe1691acce220f6d55a7bcad077020cfbec4bfb5 (patch) | |
tree | 0bec7750e40db1990ca2913e337fdb46579835f2 /src/station_cmd.cpp | |
parent | 6e20c73c336b057e3eb95baf9cb7c3504aec2597 (diff) | |
download | openttd-fe1691acce220f6d55a7bcad077020cfbec4bfb5.tar.xz |
(svn r8477) -Fix
-Codechange: Remove the unnecessary attributes Station::{bus,lorry}_tile_obsolete by replacing them with a scan of the map for existing road stops when loading old savegames
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index f59dabcc7..0c2580612 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2841,8 +2841,7 @@ static const SaveLoad _roadstop_desc[] = { static const SaveLoad _station_desc[] = { SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), SLE_CONDVAR(Station, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, bus_tile_obsolete, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Station, lorry_tile_obsolete, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDNULL(4, 0, 5), // bus/lorry tile SLE_CONDVAR(Station, train_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), SLE_CONDVAR(Station, train_tile, SLE_UINT32, 6, SL_MAX_VERSION), SLE_CONDVAR(Station, airport_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), @@ -2972,23 +2971,6 @@ static void Load_STNS(void) st->trainst_w = w; st->trainst_h = h; } - - /* In older versions, we had just 1 tile for a bus/lorry, now we have more.. - * convert, if needed */ - if (CheckSavegameVersion(6)) { - if (st->bus_tile_obsolete != 0) { - st->bus_stops = new RoadStop(st->bus_tile_obsolete); - if (st->bus_stops == NULL) - error("Station: too many busstations in savegame"); - - } - if (st->lorry_tile_obsolete != 0) { - st->truck_stops = new RoadStop(st->lorry_tile_obsolete); - if (st->truck_stops == NULL) - error("Station: too many truckstations in savegame"); - - } - } } /* This is to ensure all pointers are within the limits of _stations_size */ |