fix: train blocks didn't reverse on direction change

Dieser Commit ist enthalten in:
Reinder Feenstra 2023-12-28 23:04:23 +01:00
Ursprung 8b221eea16
Commit 62c1321fc8

Datei anzeigen

@ -62,6 +62,7 @@ Train::Train(World& world, std::string_view _id) :
// update train direction from the block perspective:
for(auto& status : *blocks)
status->direction.setValueInternal(!status->direction.value());
blocks.reverseInternal(); // index 0 is head of train
for(const auto& vehicle : m_poweredVehicles)
vehicle->setDirection(value);
@ -297,6 +298,7 @@ void Train::vehiclesChanged()
updateWeight();
updatePowered();
updateSpeedMax();
updateEnabled();
}
void Train::updateLength()