(svn r16328) -Fix: desync when removing lots of stations

This commit is contained in:
rubidium
2009-05-17 10:19:00 +00:00
parent 0c10daa243
commit 57a7313ea5
5 changed files with 8 additions and 18 deletions

View File

@@ -65,7 +65,7 @@ static const SaveLoadGlobVarList _date_desc[] = {
SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),
SLEG_CONDVAR(_cur_tileloop_tile, SLE_UINT32, 6, SL_MAX_VERSION),
SLEG_VAR(_disaster_delay, SLE_UINT16),
SLEG_VAR(_station_tick_ctr, SLE_UINT16),
SLE_CONDNULL(2, 0, 119),
SLEG_VAR(_random.state[0], SLE_UINT32),
SLEG_VAR(_random.state[1], SLE_UINT32),
SLEG_CONDVAR(_cur_town_ctr, SLE_FILE_U8 | SLE_VAR_U32, 0, 9),

View File

@@ -1707,8 +1707,7 @@ static const OldChunks main_chunk[] = {
OCL_CNULL( OC_TTD, 144 ), ///< AI cargo-stuff, calculated in InitializeLandscapeVariables
OCL_NULL( 2 ), ///< Company indexes of companies, no longer in use
OCL_VAR ( OC_FILE_U8 | OC_VAR_U16, 1, &_station_tick_ctr ),
OCL_NULL( 1 ), ///< Station tick counter, no longer in use
OCL_VAR ( OC_UINT8, 1, &_settings_game.locale.currency ),
OCL_VAR ( OC_UINT8, 1, &_settings_game.locale.units ),

View File

@@ -195,9 +195,6 @@ static void Load_STNS()
SaveLoad_STNS(st);
}
/* This is to ensure all pointers are within the limits of _stations_size */
if (_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
}
static void Save_ROADSTOP()