File diff r9948:63e8eb59806b → r9949:5ac3bf61abad
src/vehiclelist.cpp
Show inline comments
 
@@ -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;
 
							break;
 
						}
 
					}
 
				}
 
			}
 
			break;
 

	
 
		case VLW_GROUP_LIST:
 
			FOR_ALL_VEHICLES(v) {
 
				if (v->type == type && v->IsPrimaryVehicle() &&