diff options
author | yexo <yexo@openttd.org> | 2010-03-18 00:41:16 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-03-18 00:41:16 +0000 |
commit | 07cc875c5a11d8fc59c36fd49fb44d325d149069 (patch) | |
tree | aee8a4fa52032eb244b82089b021d836c0c3bb58 | |
parent | 0f9be95e03262fc8155f0008eb4cd05a6d074a52 (diff) | |
download | openttd-07cc875c5a11d8fc59c36fd49fb44d325d149069.tar.xz |
(svn r19449) -Codechange: pay for every airport tile build, not for every tile in the rectangle where the airport is build
-rw-r--r-- | src/station_cmd.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 31c15aaed..3f35649b4 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2195,7 +2195,10 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint } } - 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 tile, DoCommandFlag flags, uint32 p1, uint 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); |