diff src/station_cmd.cpp @ 9048:b848a8a5d0a8 draft

(svn r12874) -Codechange: The closest town is already known. Do not search for it again.
author belugas <belugas@openttd.org>
date Thu, 24 Apr 2008 18:17:53 +0000
parents 6e86ab2cba9f
children b10742bf511e
line wrap: on
line diff
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1714,7 +1714,7 @@
 		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)) {