(svn r26450) -Feature: Hierarchical vehicle subgroups.

This commit is contained in:
peter1138
2014-04-08 21:09:06 +00:00
parent 1d8c673587
commit ed8f6f1a0f
11 changed files with 218 additions and 51 deletions

View File

@@ -12,6 +12,7 @@
#include "stdafx.h"
#include "train.h"
#include "vehiclelist.h"
#include "group.h"
/**
* Pack a VehicleListIdentifier in a single uint32.
@@ -145,7 +146,7 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
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) {
v->owner == vli.company && GroupIsInGroup(v->group_id, vli.index)) {
*list->Append() = v;
}
}