(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:
smatz
2008-12-26 18:01:15 +00:00
parent 2e2086f3f8
commit 419f6e099f
12 changed files with 70 additions and 60 deletions

View File

@@ -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;