Mercurial > hg > openttd
changeset 1961:3537b94f4000 draft
(svn r2467) - Fix: [newgrf] Prevent trains with shorter wagons breaking apart when reversing in some cases. (Therax)
author | hackykid <hackykid@openttd.org> |
---|---|
date | Tue, 21 Jun 2005 14:50:08 +0000 |
parents | a4d5a47d102b |
children | 24ee3f699d48 |
files | train_cmd.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/train_cmd.c +++ b/train_cmd.c @@ -2643,7 +2643,7 @@ 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 @@ 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) {