From 4f7ad57c989af67681cf5956dd26a2180cc01bf6 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 13 Jul 2010 23:33:31 +0000 Subject: [PATCH] (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. --- src/elrail.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/elrail.cpp b/src/elrail.cpp index 3a4275dddc..79e9aa2be3 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -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); } }