(svn r2412) - Fix: [ 1214948 ] building vehicles without depot crashes game. (Chris Huebsch)
--- a/aircraft_gui.c Sun Jun 05 15:37:00 2005 +0000
+++ b/aircraft_gui.c Sun Jun 05 20:45:04 2005 +0000
@@ -1014,7 +1014,7 @@
tile = _last_built_aircraft_depot_tile;
do {
- if (IsTileOwner(tile, _local_player) && IsAircraftHangarTile(tile)) {
+ if (IsAircraftHangarTile(tile) && IsTileOwner(tile, _local_player)) {
ShowAircraftDepotWindow(tile);
ShowBuildAircraftWindow(tile);
return;
--- a/roadveh_gui.c Sun Jun 05 15:37:00 2005 +0000
+++ b/roadveh_gui.c Sun Jun 05 20:45:04 2005 +0000
@@ -892,7 +892,7 @@
tile = _last_built_road_depot_tile;
do {
- if (IsTileOwner(tile, _local_player) && IsTileDepotType(tile, TRANSPORT_ROAD)) {
+ if (IsTileDepotType(tile, TRANSPORT_ROAD) && IsTileOwner(tile, _local_player)) {
ShowRoadDepotWindow(tile);
ShowBuildRoadVehWindow(tile);
return;
--- a/ship_gui.c Sun Jun 05 15:37:00 2005 +0000
+++ b/ship_gui.c Sun Jun 05 20:45:04 2005 +0000
@@ -996,7 +996,7 @@
tile = _last_built_ship_depot_tile;
do {
- if (IsTileOwner(tile, _local_player) && IsTileDepotType(tile, TRANSPORT_WATER)) {
+ if (IsTileDepotType(tile, TRANSPORT_WATER) && IsTileOwner(tile, _local_player)) {
ShowShipDepotWindow(tile);
ShowBuildShipWindow(tile);
return;
--- a/train_gui.c Sun Jun 05 15:37:00 2005 +0000
+++ b/train_gui.c Sun Jun 05 20:45:04 2005 +0000
@@ -1343,7 +1343,7 @@
tile = _last_built_train_depot_tile;
do {
- if (IsTileOwner(tile, _local_player) && IsTileDepotType(tile, TRANSPORT_RAIL)) {
+ if (IsTileDepotType(tile, TRANSPORT_RAIL) && IsTileOwner(tile, _local_player)) {
ShowTrainDepotWindow(tile);
ShowBuildTrainWindow(tile);
return;