summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-16 13:52:44 +0000
committerfrosch <frosch@openttd.org>2008-08-16 13:52:44 +0000
commit302cdf69a4f697134b6495252f51a4d3b91b3f67 (patch)
treeef94e4a0a0db09b45e7db533e210de8d4885630f
parente0e86f47140eb2f6544574c4b33c4d8984c58896 (diff)
downloadopenttd-302cdf69a4f697134b6495252f51a4d3b91b3f67.tar.xz
(svn r14082) -Codechange: Make 'GetNextUnit()' more fool-proof wrt. real dualheads.
-rw-r--r--src/train.h2
1 files changed, 1 insertions, 1 deletions
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;
}