From bd736e240a58b8701a1212c0e1386b6c499cb0c3 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Mon, 31 Jul 2006 12:12:14 +0000 Subject: [PATCH] (svn r5674) - Backport from trunk (r5664): Certain combinations of trains crash when moved around inside the depot. --- train_cmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/train_cmd.c b/train_cmd.c index 7b40072005..6796aec89b 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1130,6 +1130,8 @@ int32 CmdMoveRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) src_head = src_head->next; } AddWagonToConsist(src->u.rail.other_multiheaded_part, src); + // previous line set the front engine to the old front. We need to clear that + src->u.rail.other_multiheaded_part->first = NULL; } if (HASBIT(p2, 0) && src_head != NULL && src_head != src) {