(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
authorcelestar
Sat, 09 Apr 2005 06:20:03 +0000
changeset 1669 56db93485763
parent 1668 94bf390ecd8e
child 1670 db243ec2ccf2
(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
rail_cmd.c
--- a/rail_cmd.c	Sat Apr 09 06:19:08 2005 +0000
+++ b/rail_cmd.c	Sat Apr 09 06:20:03 2005 +0000
@@ -374,7 +374,7 @@
 			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) {