Update to 1.11.0-beta1

This commit is contained in:
dP
2021-01-23 17:31:11 +03:00
parent d3c06c25c8
commit 5e4506f493
1045 changed files with 23534 additions and 60345 deletions

View File

@@ -25,7 +25,7 @@ uint32 VehicleListIdentifier::Pack() const
assert(this->vtype < (1 << 2));
assert(this->index < (1 << 20));
assert(this->type < VLT_END);
assert_compile(VLT_END <= (1 << 3));
static_assert(VLT_END <= (1 << 3));
return c << 28 | this->type << 23 | this->vtype << 26 | this->index;
}
@@ -118,9 +118,7 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
case VL_STATION_LIST:
for (const Vehicle *v : Vehicle::Iterate()) {
if (v->type == vli.vtype && v->IsPrimaryVehicle()) {
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
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) {
list->push_back(v);
@@ -165,9 +163,7 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
case VL_DEPOT_LIST:
for (const Vehicle *v : Vehicle::Iterate()) {
if (v->type == vli.vtype && v->IsPrimaryVehicle()) {
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
for (const Order *order : v->Orders()) {
if (order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) && order->GetDestination() == vli.index) {
list->push_back(v);
break;