summaryrefslogtreecommitdiff
path: root/src/vehiclelist.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-04-08 21:09:06 +0000
committerpeter1138 <peter1138@openttd.org>2014-04-08 21:09:06 +0000
commit567d0ff3a7286fe830bf188c2911e3d10d70eb8c (patch)
treef61a570d4fb3a9bb1419b0eee818692686d75462 /src/vehiclelist.cpp
parent3e9c10f9e11935a82d33fd5c66592d795c279777 (diff)
downloadopenttd-567d0ff3a7286fe830bf188c2911e3d10d70eb8c.tar.xz
(svn r26450) -Feature: Hierarchical vehicle subgroups.
Diffstat (limited to 'src/vehiclelist.cpp')
-rw-r--r--src/vehiclelist.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp
index e74f28f0f..fca9c5e46 100644
--- a/src/vehiclelist.cpp
+++ b/src/vehiclelist.cpp
@@ -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;
}
}