mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 21:06:58 +00:00
(svn r19449) -Codechange: pay for every airport tile build, not for every tile in the rectangle where the airport is build
This commit is contained in:
parent
0f9be95e03
commit
07cc875c5a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user