TBTR: Avoid articulated/rear units being added to tile hash
This commit is contained in:
@@ -427,6 +427,8 @@ void AddArticulatedParts(Vehicle *first)
|
|||||||
}
|
}
|
||||||
t->refit_cap = 0;
|
t->refit_cap = 0;
|
||||||
|
|
||||||
|
if (front->IsVirtual()) t->SetVirtual();
|
||||||
|
|
||||||
t->SetArticulatedPart();
|
t->SetArticulatedPart();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -917,6 +917,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v)
|
|||||||
u->random_bits = VehicleRandomBits();
|
u->random_bits = VehicleRandomBits();
|
||||||
v->SetMultiheaded();
|
v->SetMultiheaded();
|
||||||
u->SetMultiheaded();
|
u->SetMultiheaded();
|
||||||
|
if (v->IsVirtual()) u->SetVirtual();
|
||||||
v->SetNext(u);
|
v->SetNext(u);
|
||||||
u->UpdatePosition();
|
u->UpdatePosition();
|
||||||
|
|
||||||
@@ -5195,6 +5196,7 @@ Train* CmdBuildVirtualRailWagon(const Engine *e)
|
|||||||
|
|
||||||
v->SetWagon();
|
v->SetWagon();
|
||||||
v->SetFreeWagon();
|
v->SetFreeWagon();
|
||||||
|
v->SetVirtual();
|
||||||
|
|
||||||
v->cargo_type = e->GetDefaultCargoType();
|
v->cargo_type = e->GetDefaultCargoType();
|
||||||
v->cargo_cap = rvi->capacity;
|
v->cargo_cap = rvi->capacity;
|
||||||
@@ -5281,6 +5283,7 @@ Train* CmdBuildVirtualRailVehicle(EngineID eid, StringID &error)
|
|||||||
|
|
||||||
v->SetFrontEngine();
|
v->SetFrontEngine();
|
||||||
v->SetEngine();
|
v->SetEngine();
|
||||||
|
v->SetVirtual();
|
||||||
|
|
||||||
if (rvi->railveh_type == RAILVEH_MULTIHEAD) {
|
if (rvi->railveh_type == RAILVEH_MULTIHEAD) {
|
||||||
AddRearEngineToMultiheadedTrain(v);
|
AddRearEngineToMultiheadedTrain(v);
|
||||||
|
Reference in New Issue
Block a user