From 01e0792b9188097907dfb52e34b4da8502482baa Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 13 Jul 2010 23:33:31 +0000 Subject: (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 3a4275ddd..79e9aa2be 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); } } -- cgit v1.2.3-70-g09d2