(svn r20137) -Fix [FS#3945]: desync due to (temporary) wrong railtype; when loading a savegame the railtype of some (high ID) trains could be wrong.

After loading the vehicle data in the trains are updated, but after that the "electrification" checks are done which can change the "global" vehicle data. However, this update is not propagated to the vehicles until the consist is updated, e.g. turning around and going to a depot.
This makes some of the trains of a just joined client run as non-electrified trains which can cause it to take a wrong path or to not (randomly) show the electric sparks.
replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 14 years ago
parent 4975f5a94c
commit 01e0792b91

@ -600,8 +600,7 @@ bool SettingsDisableElrail(int32 p1)
FOR_ALL_TRAINS(t) {
/* power and acceleration is cached only for front engines */
if (t->IsFrontEngine()) {
t->PowerChanged();
t->UpdateAcceleration();
t->ConsistChanged(true);
}
}

Loading…
Cancel
Save