mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
TBTR: Fix attempting to get sprite for new virtual engine before marking as virtual
This commit is contained in:
parent
753fc2ab67
commit
40c99956ed
@ -4209,8 +4209,6 @@ Train* CmdBuildVirtualRailVehicle(EngineID eid, bool lax_engine_check, StringID
|
||||
v->SetFrontEngine();
|
||||
v->SetEngine();
|
||||
|
||||
v->UpdateViewport(true, false);
|
||||
|
||||
if (rvi->railveh_type == RAILVEH_MULTIHEAD) {
|
||||
AddRearEngineToMultiheadedTrain(v);
|
||||
} else {
|
||||
@ -4222,6 +4220,8 @@ Train* CmdBuildVirtualRailVehicle(EngineID eid, bool lax_engine_check, StringID
|
||||
train_part->SetVirtual();
|
||||
}
|
||||
|
||||
v->UpdateViewport(true, false);
|
||||
|
||||
v->ConsistChanged(CCF_ARRANGE);
|
||||
|
||||
CheckConsistencyOfArticulatedVehicle(v);
|
||||
|
Loading…
Reference in New Issue
Block a user