Exclude virtual trains from various vehicle list iterations
This commit is contained in:
@@ -2499,7 +2499,7 @@ static int WhoCanServiceIndustry(Industry *ind)
|
||||
/* Check whether it accepts the right kind of cargo */
|
||||
bool c_accepts = false;
|
||||
bool c_produces = false;
|
||||
if (v->type == VEH_TRAIN && v->IsFrontEngine()) {
|
||||
if (v->type == VEH_TRAIN && v->IsFrontEngine() && !HasBit(v->subtype, GVSF_VIRTUAL)) {
|
||||
for (const Vehicle *u = v; u != nullptr; u = u->Next()) {
|
||||
CanCargoServiceIndustry(u->cargo_type, ind, &c_accepts, &c_produces);
|
||||
}
|
||||
|
Reference in New Issue
Block a user