mirror of https://github.com/OpenTTD/OpenTTD
(svn r12874) -Codechange: The closest town is already known. Do not search for it again.
parent
91fa34ea11
commit
fbeaf0389d
|
@ -1714,7 +1714,7 @@ CommandCost CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
st = new Station();
|
st = new Station();
|
||||||
|
|
||||||
st->town = ClosestTownFromTile(tile, (uint)-1);
|
st->town = t;
|
||||||
GenerateStationName(st, tile, !(afc->flags & AirportFTAClass::AIRPLANES) ? STATIONNAMING_HELIPORT : STATIONNAMING_AIRPORT);
|
GenerateStationName(st, tile, !(afc->flags & AirportFTAClass::AIRPLANES) ? STATIONNAMING_HELIPORT : STATIONNAMING_AIRPORT);
|
||||||
|
|
||||||
if (IsValidPlayer(_current_player)) {
|
if (IsValidPlayer(_current_player)) {
|
||||||
|
|
Loading…
Reference in New Issue