diff options
author | rubidium <rubidium@openttd.org> | 2010-07-13 23:33:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-07-13 23:33:31 +0000 |
commit | 01e0792b9188097907dfb52e34b4da8502482baa (patch) | |
tree | b8cac93e4c4a739a33daede31d9c6a34c79a1cc9 /src | |
parent | 4975f5a94c931417d9b8c0ed163931730f68149e (diff) | |
download | openttd-01e0792b9188097907dfb52e34b4da8502482baa.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/elrail.cpp | 3 |
1 files changed, 1 insertions, 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); } } |