(svn r10022) -Fix (r10007): Set the type of multiheaded trains before the subtype.
authormaedhros
Sat, 02 Jun 2007 11:15:38 +0000
changeset 7280 358095cd3c51
parent 7279 cbc7fe26facf
child 7281 d8790704c8b0
(svn r10022) -Fix (r10007): Set the type of multiheaded trains before the subtype.
src/train_cmd.cpp
--- a/src/train_cmd.cpp	Sat Jun 02 09:26:03 2007 +0000
+++ b/src/train_cmd.cpp	Sat Jun 02 11:15:38 2007 +0000
@@ -626,6 +626,7 @@
 	u->z_pos = v->z_pos;
 	u->u.rail.track = TRACK_BIT_DEPOT;
 	u->vehstatus = v->vehstatus & ~VS_STOPPED;
+	u = new (u) Train();
 	u->subtype = 0;
 	SetMultiheaded(u);
 	u->spritenum = v->spritenum + 1;
@@ -638,7 +639,6 @@
 	u->build_year = v->build_year;
 	if (building) v->value >>= 1;
 	u->value = v->value;
-	u = new (u) Train();
 	u->cur_image = 0xAC2;
 	u->random_bits = VehicleRandomBits();
 	VehiclePositionChanged(u);