changeset 73:ae5f1d4d34c4 draft

(svn r74) -Fix: [1009631] Wrong multihead selling (Bodewes)
author truelight <truelight@openttd.org>
date Tue, 17 Aug 2004 09:29:26 +0000
parents 0ecf460b53fc
children ede669f0e0bd
files train_cmd.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -777,7 +777,8 @@
 		if (p2 != 1) {
 			// sell last part of multiheaded?
 			last = GetLastVehicleInChain(v);
-			if (is_firsthead_sprite(last->spritenum))
+			// Check if the end-part is the same engine and check if it is the rear-end
+			if (last->engine_type != first->engine_type || is_firsthead_sprite(last->spritenum))
 				last = NULL;
 		} else {
 			last = NULL;