summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-04-04 14:21:46 +0000
committermaedhros <maedhros@openttd.org>2007-04-04 14:21:46 +0000
commit0340291888f6646f842cd27936032bf1e066b7ac (patch)
tree5c1252fe5c41c1984b403c774027a6871a9000b6 /src/command.cpp
parentb430c03cdd38e96d8dd94030ed2cbac4d5cccbcc (diff)
downloadopenttd-0340291888f6646f842cd27936032bf1e066b7ac.tar.xz
(svn r9562) -Fix: When cloning, pay for the refit costs as well.
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 7bd6a3992..e72f6963a 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -455,13 +455,17 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
* restrictions which may cause the test run to fail (the previous
* road fragments still stay there and the town won't let you
* disconnect the road system), but the exec will succeed and this
- * fact will trigger an assertion failure. --pasky */
+ * fact will trigger an assertion failure. --pasky
+ * CMD_CLONE_VEHICLE: You can only refit vehicles once they have been
+ * bought, so you can't estimate the cost of cloning if the vehicle to be
+ * cloned has been refitted. */
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
(cmd & 0xFF) == CMD_REMOVE_ROAD ||
- (cmd & 0xFF) == CMD_REMOVE_LONG_ROAD;
+ (cmd & 0xFF) == CMD_REMOVE_LONG_ROAD ||
+ (cmd & 0xFF) == CMD_CLONE_VEHICLE;
_docommand_recursive = 1;