From fbeaf0389d95c1e149cb7f9b5f3939a159eba518 Mon Sep 17 00:00:00 2001 From: belugas Date: Thu, 24 Apr 2008 18:17:53 +0000 Subject: (svn r12874) -Codechange: The closest town is already known. Do not search for it again. --- src/station_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index a57e0a1e5..4261425ac 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -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)) { -- cgit v1.2.3-70-g09d2