summaryrefslogtreecommitdiff
path: root/src/vehiclelist.cpp
diff options
context:
space:
mode:
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;
}
}