summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-09-08 21:40:00 +0000
committerrubidium <rubidium@openttd.org>2010-09-08 21:40:00 +0000
commit4b605f51abceef248c0197bf3c67091d8cafcdeb (patch)
treeeb89c55204e4f699e349a68e30bdf5b7bd6c2580 /src/vehicle_gui.cpp
parentf5128695c54ad634e1ac45ae4271c1db5ed15fad (diff)
downloadopenttd-4b605f51abceef248c0197bf3c67091d8cafcdeb.tar.xz
(svn r20773) -Codechange: use packed VehicleListIdentifiers for some commands as well
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index a5d5fef1f..eaed32c24 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1284,7 +1284,7 @@ public:
case VLW_WIDGET_STOP_ALL:
case VLW_WIDGET_START_ALL:
- DoCommandP(0, (1 << 1) | (widget == VLW_WIDGET_START_ALL ? (1 << 0) : 0), GB(this->window_number, 16, 16) << 16 | (this->window_number & VLW_MASK) | this->vehicle_type, CMD_MASS_START_STOP);
+ DoCommandP(0, (1 << 1) | (widget == VLW_WIDGET_START_ALL ? (1 << 0) : 0), this->window_number, CMD_MASS_START_STOP);
break;
}
}
@@ -1303,12 +1303,8 @@ public:
ShowReplaceGroupVehicleWindow(DEFAULT_GROUP, this->vehicle_type);
break;
case ADI_SERVICE: // Send for servicing
- DoCommandP(0, GB(this->window_number, 16, 16) | DEPOT_MASS_SEND | DEPOT_SERVICE /* StationID or OrderID (depending on VLW) */,
- (this->window_number & VLW_MASK) | this->vehicle_type << 11, GetCmdSendToDepot(this->vehicle_type));
- break;
case ADI_DEPOT: // Send to Depots
- DoCommandP(0, GB(this->window_number, 16, 16) | DEPOT_MASS_SEND /* StationID or OrderID (depending on VLW) */,
- (this->window_number & VLW_MASK) | this->vehicle_type << 11, GetCmdSendToDepot(this->vehicle_type));
+ DoCommandP(0, DEPOT_MASS_SEND | (index == ADI_SERVICE ? DEPOT_SERVICE : (DepotCommand)0), this->window_number, GetCmdSendToDepot(this->vehicle_type));
break;
default: NOT_REACHED();