summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-04-24 18:17:53 +0000
committerbelugas <belugas@openttd.org>2008-04-24 18:17:53 +0000
commitfbeaf0389d95c1e149cb7f9b5f3939a159eba518 (patch)
tree2d9044e2713d839a8d1d97f7f3a6c82996745ec4 /src
parent91fa34ea11919b6a33fc712cc3f059f0b2cab5be (diff)
downloadopenttd-fbeaf0389d95c1e149cb7f9b5f3939a159eba518.tar.xz
(svn r12874) -Codechange: The closest town is already known. Do not search for it again.
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
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)) {