mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r20776) -Codechange: make VehicleLists for the group "ALL_GROUP" work as well
This commit is contained in:
parent
976ee2a91e
commit
3ebf8a297e
@ -139,6 +139,18 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
|
||||
}
|
||||
break;
|
||||
|
||||
case VL_GROUP_LIST:
|
||||
if (vli.index != ALL_GROUP) {
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == vli.vtype && v->IsPrimaryVehicle() &&
|
||||
v->owner == vli.company && v->group_id == vli.index) {
|
||||
*list->Append() = v;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
|
||||
case VL_STANDARD:
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == vli.vtype && v->owner == vli.company && v->IsPrimaryVehicle()) {
|
||||
@ -162,15 +174,6 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
|
||||
}
|
||||
break;
|
||||
|
||||
case VL_GROUP_LIST:
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == vli.vtype && v->IsPrimaryVehicle() &&
|
||||
v->owner == vli.company && v->group_id == vli.index) {
|
||||
*list->Append() = v;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default: return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user