Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/crashlog.cpp # src/fileio.cpp # src/fileio_func.h # src/fios_gui.cpp # src/ini_load.cpp # src/ini_type.h # src/lang/english.txt # src/lang/german.txt # src/lang/korean.txt # src/network/network_client.cpp # src/order_base.h # src/order_cmd.cpp # src/os/windows/win32.cpp # src/road_cmd.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/settings.cpp # src/station_cmd.cpp # src/stdafx.h # src/table/settings.ini # src/tree_cmd.cpp # src/tree_gui.cpp # src/vehicle_base.h # src/video/cocoa/cocoa_v.mm # src/video/cocoa/event.mm # src/video/cocoa/wnd_quartz.mm # src/viewport.cpp # src/widgets/tree_widget.h
This commit is contained in:
@@ -26,7 +26,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;
|
||||
}
|
||||
@@ -128,9 +128,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);
|
||||
@@ -172,9 +170,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;
|
||||
|
Reference in New Issue
Block a user