summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-01-04 16:53:00 +0000
committerpeter1138 <peter1138@openttd.org>2006-01-04 16:53:00 +0000
commitb6721d7e95167d483e54b069c994c0ba91333122 (patch)
treecb418b6608a3e2911c8542f4090d63e0e6546d82 /vehicle.c
parentc5496ae092aaec5d3aeb16bbbfde470f6aeb229c (diff)
downloadopenttd-b6721d7e95167d483e54b069c994c0ba91333122.tar.xz
(svn r3361) - Clone Vehicle: Disallow cloning of crashed rail vehicles after starting removal process.
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 9cef33051..e82bcf66e 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1508,7 +1508,7 @@ int32 CmdCloneVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
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)) {