1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-25 23:49:09 +00:00

(svn r12874) -Codechange: The closest town is already known. Do not search for it again.

This commit is contained in:
belugas
2008-04-24 18:17:53 +00:00
parent 91fa34ea11
commit fbeaf0389d

View File

@@ -1714,7 +1714,7 @@ CommandCost CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
st = new Station();
st->town = ClosestTownFromTile(tile, (uint)-1);
st->town = t;
GenerateStationName(st, tile, !(afc->flags & AirportFTAClass::AIRPLANES) ? STATIONNAMING_HELIPORT : STATIONNAMING_AIRPORT);
if (IsValidPlayer(_current_player)) {