diff options
author | hackykid <hackykid@openttd.org> | 2005-06-21 14:50:08 +0000 |
---|---|---|
committer | hackykid <hackykid@openttd.org> | 2005-06-21 14:50:08 +0000 |
commit | e2df1d71d5ec39f89c540f116c1cb0b765a74229 (patch) | |
tree | 892ee23d5a1b640446670068c4985078f926f651 | |
parent | e5ccce418f3c84889e41a5a2cd36499dcfc94f68 (diff) | |
download | openttd-e2df1d71d5ec39f89c540f116c1cb0b765a74229.tar.xz |
(svn r2467) - Fix: [newgrf] Prevent trains with shorter wagons breaking apart when reversing in some cases. (Therax)
-rw-r--r-- | train_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c index 414c34b43..9b5192e61 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2643,7 +2643,7 @@ static void *CheckVehicleAtSignal(Vehicle *v, void *data) static void TrainController(Vehicle *v) { - Vehicle *prev = NULL; + Vehicle *prev; GetNewVehiclePosResult gp; uint32 r, tracks,ts; int i, enterdir, newdir, dir; @@ -2652,7 +2652,7 @@ static void TrainController(Vehicle *v) byte old_z; /* For every vehicle after and including the given vehicle */ - for (; v != NULL; prev = v, v = v->next) { + for (prev = GetPrevVehicleInChain(v); v != NULL; prev = v, v = v->next) { BeginVehicleMove(v); if (v->u.rail.track != 0x40) { |