summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpasky <pasky@openttd.org>2004-11-20 02:25:31 +0000
committerpasky <pasky@openttd.org>2004-11-20 02:25:31 +0000
commite1c1036648f827da88301468ab56280a4a1e03ea (patch)
treebce05f413d46947a0e4288b873d34ec5c208175c
parent5650257c0c7aebfd680d44204ea0d711e41eef98 (diff)
downloadopenttd-e1c1036648f827da88301468ab56280a4a1e03ea.tar.xz
(svn r697) Fix the town road removal crash _still_ present there.
-rw-r--r--command.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/command.c b/command.c
index a5fb15046..ab016fc19 100644
--- a/command.c
+++ b/command.c
@@ -413,11 +413,17 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
proc = _command_proc_table[cmd & 0xFF];
// this command is a notest command?
+ // CMD_REMOVE_ROAD: This command has special local authority
+ // 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
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
- (cmd & 0xFF) == CMD_TRAIN_GOTO_DEPOT;
+ (cmd & 0xFF) == CMD_TRAIN_GOTO_DEPOT ||
+ (cmd & 0xFF) == CMD_REMOVE_ROAD;
if (_networking && (cmd & CMD_ASYNC)) notest = true;