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
commit91d44ef577f64e407128f61efa4e93a7ee9e8076 (patch)
tree908c0045841305ecaee2e50af7882ca30c939734
parent5a65140cb46a4c0a9849166a8724115a0fbdd83d (diff)
downloadopenttd-91d44ef577f64e407128f61efa4e93a7ee9e8076.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) {