TBTR: Fix incorrect train not buildable warning with articulated units
This commit is contained in:
@@ -306,7 +306,7 @@ public:
|
|||||||
|
|
||||||
int y = 4 - this->vscroll->GetPosition();
|
int y = 4 - this->vscroll->GetPosition();
|
||||||
bool buildable = true;
|
bool buildable = true;
|
||||||
for (Train *train = this->virtual_train; train != nullptr; train = train->Next()) {
|
for (Train *train = this->virtual_train; train != nullptr; train = train->GetNextUnit()) {
|
||||||
if (!IsEngineBuildable(train->engine_type, VEH_TRAIN, train->owner)) buildable = false;
|
if (!IsEngineBuildable(train->engine_type, VEH_TRAIN, train->owner)) buildable = false;
|
||||||
}
|
}
|
||||||
if (!buildable) {
|
if (!buildable) {
|
||||||
|
@@ -656,7 +656,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool buildable = true;
|
bool buildable = true;
|
||||||
for (const TemplateVehicle *u = v; u != nullptr; u = u->Next()) {
|
for (const TemplateVehicle *u = v; u != nullptr; u = u->GetNextUnit()) {
|
||||||
if (!IsEngineBuildable(u->engine_type, VEH_TRAIN, u->owner)) {
|
if (!IsEngineBuildable(u->engine_type, VEH_TRAIN, u->owner)) {
|
||||||
buildable = false;
|
buildable = false;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user