diff options
author | yexo <yexo@openttd.org> | 2010-02-22 14:17:07 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-02-22 14:17:07 +0000 |
commit | 698737f485cfbdd1605faecd50395bb67f7dac75 (patch) | |
tree | b79303520896365e70a9aa3224a5f1c6a14b5aba /src/water_cmd.cpp | |
parent | 7ca4c31cf558ff29b3cbe14cd348bcf649445dfc (diff) | |
download | openttd-698737f485cfbdd1605faecd50395bb67f7dac75.tar.xz |
(svn r19198) -Codechange: store the size of stations in savegames
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 25d876792..5bcde05b2 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -728,11 +728,8 @@ static void FloodVehicles(TileIndex tile) const Station *st = Station::GetByTile(tile); const AirportSpec *as = st->GetAirportSpec(); z = 1 + st->Airport()->delta_z; - for (uint x = 0; x < as->size_x; x++) { - for (uint y = 0; y < as->size_y; y++) { - tile = TILE_ADDXY(st->airport_tile, x, y); - FindVehicleOnPos(tile, &z, &FloodVehicleProc); - } + TILE_AREA_LOOP(tile, st->airport) { + if (st->TileBelongsToAirport(tile)) FindVehicleOnPos(tile, &z, &FloodVehicleProc); } /* No vehicle could be flooded on this airport anymore */ |