(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)
This commit is contained in:
@@ -1409,6 +1409,16 @@ bool AfterLoadGame()
|
||||
/* From this point the old names array is cleared. */
|
||||
ResetOldNames();
|
||||
|
||||
/* no station is determined by 'tile == INVALID_TILE' now (instead of '0') */
|
||||
if (CheckSavegameVersion(105)) {
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
if (st->airport_tile == 0) st->airport_tile = INVALID_TILE;
|
||||
if (st->dock_tile == 0) st->dock_tile = INVALID_TILE;
|
||||
if (st->train_tile == 0) st->train_tile = INVALID_TILE;
|
||||
}
|
||||
}
|
||||
|
||||
/* convert road side to my format. */
|
||||
if (_settings_game.vehicle.road_side) _settings_game.vehicle.road_side = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user