(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.
This commit is contained in:
rubidium 2010-07-13 23:33:31 +00:00
parent 4975f5a94c
commit 01e0792b91

View File

@ -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);
}
}