@@ -67,6 +67,7 @@ void BuildDepotVehicleList(VehicleType t
* <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>VLM_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
*/
@@ -122,6 +123,21 @@ void GenerateVehicleSortList(VehicleList
}
break;
case VLM_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;
case VLW_GROUP_LIST:
if (v->type == type && v->IsPrimaryVehicle() &&