From c0c75ef16e57e6f2bbc8f3b7eeca2ec6b26ba053 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Wed, 14 Sep 2005 18:03:38 +0000 Subject: (svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone - Add IsLocalPlayer() which substitutes _local_player == _current_player --- station_cmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'station_cmd.c') diff --git a/station_cmd.c b/station_cmd.c index 17c8162dd..6bf8a66e8 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1782,9 +1782,8 @@ int32 CmdBuildAirport(int x, int y, uint32 flags, uint32 p1, uint32 p2) const AirportFTAClass *afc = GetAirport(p1); st->owner = _current_player; - if (_current_player == _local_player && afc->nof_depots != 0) { - _last_built_aircraft_depot_tile = tile + ToTileIndexDiff(afc->airport_depots[0]); - } + if (IsLocalPlayer() && afc->nof_depots != 0) + _last_built_aircraft_depot_tile = tile + ToTileIndexDiff(afc->airport_depots[0]); st->airport_tile = tile; if (!st->facilities) st->xy = tile; -- cgit v1.2.3-54-g00ecf