summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-04-09 06:20:03 +0000
committercelestar <celestar@openttd.org>2005-04-09 06:20:03 +0000
commit23b1617cdfbba6b1cd385be1683cedc0755e8fc0 (patch)
tree908c0045841305ecaee2e50af7882ca30c939734
parent084415978662cb0fed00286f6456f34aebe9606c (diff)
downloadopenttd-23b1617cdfbba6b1cd385be1683cedc0755e8fc0.tar.xz
(svn r2173) -Fix: [ 1179380 ] Rail now builds on reserved land. Cause by the problem that CMD_ERROR is just the highest bit of the return value, but CMD_CLEAR_LANDSCAPE returns a negative value for owned land. So the highest bit is set as well. Note to self: Finish Command Patch
-rw-r--r--rail_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 8c48fa6b7..2a243b17f 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -374,7 +374,7 @@ int32 CmdBuildSingleRail(int x, int y, uint32 flags,
cost += ret;
ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
- if (ret & CMD_ERROR) return ret;
+ if (ret == CMD_ERROR) return ret;
cost += ret;
if (flags & DC_EXEC) {