diff options
author | tron <tron@openttd.org> | 2004-12-18 12:46:29 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-18 12:46:29 +0000 |
commit | 0cdcb1d6c734ec8bcfe1c3983b49a569e2ae4b77 (patch) | |
tree | 1e42b5875d609cdd136974e21ed2f90aad56482b | |
parent | 11d477044c1e1c85e959ac659ac6c7b254020a60 (diff) | |
download | openttd-0cdcb1d6c734ec8bcfe1c3983b49a569e2ae4b77.tar.xz |
(svn r1151) Fix last commit |:
-rw-r--r-- | station_cmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/station_cmd.c b/station_cmd.c index a45235642..c59cd3027 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1583,9 +1583,11 @@ int32 CmdBuildAirport(int x, int y, uint32 flags, uint32 p1, uint32 p2) cost += _price.build_airport * w * h; if (flags & DC_EXEC) { + const AirportFTAClass *afc = GetAirport(p1); + st->owner = _current_player; - if (_current_player == _local_player && p1 <= AT_INTERNATIONAL) { - _last_built_aircraft_depot_tile = tile + GetAirport(p1)->airport_depots[0]; + if (_current_player == _local_player && afc->nof_depots != 0) { + _last_built_aircraft_depot_tile = tile + afc->airport_depots[0]; } st->airport_tile = tile; |