From 56459cab81f6a56d1fde29130670d001389ff7ce Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 16 Aug 2008 13:52:44 +0000 Subject: (svn r14082) -Codechange: Make 'GetNextUnit()' more fool-proof wrt. real dualheads. --- src/train.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train.h b/src/train.h index 27e232935..0e92a962c 100644 --- a/src/train.h +++ b/src/train.h @@ -255,7 +255,7 @@ static inline Vehicle *GetNextUnit(Vehicle *v) { assert(v->type == VEH_TRAIN); v = GetNextVehicle(v); - if (v != NULL && IsRearDualheaded(v)) v = v->Next(); + if (v != NULL && IsRearDualheaded(v)) v = GetNextVehicle(v); return v; } -- cgit v1.2.3-70-g09d2