(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
1 changed files with 1 additions and 1 deletions

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)) {