Merge branch 'master' into jgrpp
# Conflicts: # src/CMakeLists.txt # src/network/network_server.cpp # src/network/network_survey.cpp # src/vehiclelist.cpp
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "train.h"
|
||||
#include "vehiclelist.h"
|
||||
#include "vehiclelist_func.h"
|
||||
#include "group.h"
|
||||
#include "tracerestrict.h"
|
||||
|
||||
@@ -164,17 +165,11 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
|
||||
|
||||
switch (vli.type) {
|
||||
case VL_STATION_LIST:
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->type == vli.vtype && v->IsPrimaryVehicle()) {
|
||||
for (const Order *order : v->Orders()) {
|
||||
if ((order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT) || order->IsType(OT_IMPLICIT))
|
||||
&& order->GetDestination() == vli.index) {
|
||||
add_veh(v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FindVehiclesWithOrder(
|
||||
[&vli](const Vehicle *v) { return v->type == vli.vtype; },
|
||||
[&vli](const Order *order) { return (order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT) || order->IsType(OT_IMPLICIT)) && order->GetDestination() == vli.index; },
|
||||
[&add_veh](const Vehicle *v) { add_veh(v); }
|
||||
);
|
||||
break;
|
||||
|
||||
case VL_SHARED_ORDERS: {
|
||||
@@ -206,16 +201,11 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
|
||||
break;
|
||||
|
||||
case VL_DEPOT_LIST:
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->type == vli.vtype && v->IsPrimaryVehicle()) {
|
||||
for (const Order *order : v->Orders()) {
|
||||
if (order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) && order->GetDestination() == vli.index) {
|
||||
add_veh(v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FindVehiclesWithOrder(
|
||||
[&vli](const Vehicle *v) { return v->type == vli.vtype; },
|
||||
[&vli](const Order *order) { return order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) && order->GetDestination() == vli.index; },
|
||||
[&add_veh](const Vehicle *v) { add_veh(v); }
|
||||
);
|
||||
break;
|
||||
|
||||
case VL_SLOT_LIST: {
|
||||
|
Reference in New Issue
Block a user