summaryrefslogtreecommitdiff
path: root/src/vehiclelist.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-06-11 00:18:28 +0000
committersmatz <smatz@openttd.org>2010-06-11 00:18:28 +0000
commitc4175b752a11b3b8c0c2d6b6677493f942b11fb8 (patch)
treebaf7ed0749d967050706ed43dd709c99ea4d93fc /src/vehiclelist.cpp
parent8bf4a7d1ae5643b20d842f7fe9637e453614b8aa (diff)
downloadopenttd-c4175b752a11b3b8c0c2d6b6677493f942b11fb8.tar.xz
(svn r19957) -Codechange: remove VLW_WAYPOINT_LIST
Diffstat (limited to 'src/vehiclelist.cpp')
-rw-r--r--src/vehiclelist.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp
index ce312ff09..6f5ca7c34 100644
--- a/src/vehiclelist.cpp
+++ b/src/vehiclelist.cpp
@@ -68,12 +68,11 @@ void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine
* @param owner Company to generate list for
* @param index This parameter has different meanings depending on window_type
* <ul>
- * <li>VLW_STATION_LIST: index of station to generate a list for</li>
+ * <li>VLW_STATION_LIST: index of station/waypoint to generate a list for</li>
* <li>VLW_SHARED_ORDERS: index of order to generate a list for<li>
* <li>VLW_STANDARD: not used<li>
* <li>VLW_DEPOT_LIST: TileIndex of the depot/hangar to make the list for</li>
* <li>VLW_GROUP_LIST: index of group to generate a list for</li>
- * <li>VLW_WAYPOINT_LIST: index of waypoint to generate a list for</li>
* </ul>
* @param window_type The type of window the list is for, using the VLW_ flags in vehicle_gui.h
* @return false if invalid list is requested
@@ -91,7 +90,8 @@ bool GenerateVehicleSortList(VehicleList *list, VehicleType type, Owner owner, u
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
- if (order->IsType(OT_GOTO_STATION) && order->GetDestination() == index) {
+ if ((order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT))
+ && order->GetDestination() == index) {
*list->Append() = v;
break;
}
@@ -133,21 +133,6 @@ bool GenerateVehicleSortList(VehicleList *list, VehicleType type, Owner owner, u
}
break;
- case VLW_WAYPOINT_LIST:
- FOR_ALL_VEHICLES(v) {
- if (v->type == type && v->IsPrimaryVehicle()) {
- const Order *order;
-
- FOR_VEHICLE_ORDERS(v, order) {
- if (order->IsType(OT_GOTO_WAYPOINT) && order->GetDestination() == index) {
- *list->Append() = v;
- break;
- }
- }
- }
- }
- break;
-
case VLW_GROUP_LIST:
FOR_ALL_VEHICLES(v) {
if (v->type == type && v->IsPrimaryVehicle() &&