(svn r3361) - Clone Vehicle: Disallow cloning of crashed rail vehicles after starting removal process.
authorpeter1138
Wed, 04 Jan 2006 16:53:00 +0000
changeset 2813 504f3e6d14ff
parent 2812 95102021c840
child 2814 872583ce2ae7
(svn r3361) - Clone Vehicle: Disallow cloning of crashed rail vehicles after starting removal process.
vehicle.c
--- a/vehicle.c	Mon Jan 02 22:40:39 2006 +0000
+++ b/vehicle.c	Wed Jan 04 16:53:00 2006 +0000
@@ -1508,7 +1508,7 @@
 
 	if (!CheckOwnership(v->owner)) return CMD_ERROR;
 
-	if (v->type == VEH_Train && !IsFrontEngine(v)) return CMD_ERROR;
+	if (v->type == VEH_Train && (!IsFrontEngine(v) || v->u.rail.crash_anim_pos >= 4400)) return CMD_ERROR;
 
 	// check that we can allocate enough vehicles
 	if (!(flags & DC_EXEC)) {