(svn r5674) - Backport from trunk (r5664): 0.4
authorDarkvater
Mon, 31 Jul 2006 12:12:14 +0000
branch0.4
changeset 10069 0cca43840d61
parent 10068 0d713ced91d5
child 10070 308b88d1851f
(svn r5674) - Backport from trunk (r5664):
Certain combinations of trains crash when moved around inside the depot.
train_cmd.c
--- a/train_cmd.c	Mon Jul 31 12:11:14 2006 +0000
+++ b/train_cmd.c	Mon Jul 31 12:12:14 2006 +0000
@@ -1130,6 +1130,8 @@
 				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) {