mirror of https://github.com/OpenTTD/OpenTTD
(svn r2467) - Fix: [newgrf] Prevent trains with shorter wagons breaking apart when reversing in some cases. (Therax)
parent
e5ccce418f
commit
e2df1d71d5
|
@ -2643,7 +2643,7 @@ static void *CheckVehicleAtSignal(Vehicle *v, void *data)
|
||||||
|
|
||||||
static void TrainController(Vehicle *v)
|
static void TrainController(Vehicle *v)
|
||||||
{
|
{
|
||||||
Vehicle *prev = NULL;
|
Vehicle *prev;
|
||||||
GetNewVehiclePosResult gp;
|
GetNewVehiclePosResult gp;
|
||||||
uint32 r, tracks,ts;
|
uint32 r, tracks,ts;
|
||||||
int i, enterdir, newdir, dir;
|
int i, enterdir, newdir, dir;
|
||||||
|
@ -2652,7 +2652,7 @@ static void TrainController(Vehicle *v)
|
||||||
byte old_z;
|
byte old_z;
|
||||||
|
|
||||||
/* For every vehicle after and including the given vehicle */
|
/* 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);
|
BeginVehicleMove(v);
|
||||||
|
|
||||||
if (v->u.rail.track != 0x40) {
|
if (v->u.rail.track != 0x40) {
|
||||||
|
|
Loading…
Reference in New Issue