summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-09 10:34:32 +0000
committerrubidium <rubidium@openttd.org>2007-09-09 10:34:32 +0000
commitefea7622acb6dbf5b4a75be3e0b0c6d016e5feb1 (patch)
tree3c503e126418430925368a8acd79eb761219d6ef /src/vehicle_gui.cpp
parented3b1d398aaa6643d255eb792b8226d35eafceed (diff)
downloadopenttd-efea7622acb6dbf5b4a75be3e0b0c6d016e5feb1.tar.xz
(svn r11067) -Codechange: also make it possible to use the advanced vehicle list for other players. Patch by SmatZ.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 7f9dac2b2..16f42465b 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1240,7 +1240,12 @@ static void ShowVehicleListWindowLocal(PlayerID player, uint16 VLW_flag, Vehicle
void ShowVehicleListWindow(PlayerID player, VehicleType vehicle_type)
{
- if (player == _local_player && _patches.advanced_vehicle_list) {
+ /* If _patches.advanced_vehicle_list > 1, display the Advanced list
+ * if _patches.advanced_vehicle_list == 1, display Advanced list only for local player
+ * if _ctrl_pressed, do the opposite action (Advanced list x Normal list)
+ */
+
+ if ((_patches.advanced_vehicle_list > (player != _local_player)) != _ctrl_pressed) {
ShowPlayerGroup(player, vehicle_type);
} else {
ShowVehicleListWindowLocal(player, VLW_STANDARD, vehicle_type, 0);