# HG changeset patch # User yexo # Date 2010-03-18 00:41:16 # Node ID 47401053c1ce46dad18bb98eebdce7f6aa600e58 # Parent 1346ce055d4be5ae6ef9dccc7fa8cfb1da478455 (svn r19449) -Codechange: pay for every airport tile build, not for every tile in the rectangle where the airport is build diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2195,7 +2195,10 @@ CommandCost CmdBuildAirport(TileIndex ti } } - cost.AddCost(_price[PR_BUILD_STATION_AIRPORT] * w * h); + const AirportTileTable *it = as->table[layout]; + do { + cost.AddCost(_price[PR_BUILD_STATION_AIRPORT]); + } while ((++it)->ti.x != -0x80); if (flags & DC_EXEC) { /* Always add the noise, so there will be no need to recalculate when option toggles */ @@ -2207,7 +2210,7 @@ CommandCost CmdBuildAirport(TileIndex ti st->rect.BeforeAddRect(tile, w, h, StationRect::ADD_TRY); - const AirportTileTable *it = as->table[layout]; + it = as->table[layout]; do { TileIndex cur_tile = tile + ToTileIndexDiff(it->ti); MakeAirport(cur_tile, st->owner, st->index, it->gfx);