rail_cmd.c
changeset 2364 5ac6c8d6e031
parent 2261 3f78323707bb
child 2422 914a12dee832
--- a/rail_cmd.c	Thu Aug 25 13:29:32 2005 +0000
+++ b/rail_cmd.c	Thu Aug 25 16:53:51 2005 +0000
@@ -288,7 +288,7 @@
 	switch (GetTileType(tile)) {
 		case MP_TUNNELBRIDGE:
 			if ((m5 & 0xC0) != 0xC0 || // not bridge middle part?
-					(m5 & 0x01 ? 1 : 2) != trackbit) { // wrong direction?
+					(m5 & 0x01 ? TRACK_BIT_DIAG1 : TRACK_BIT_DIAG2) != trackbit) { // wrong direction?
 				// Get detailed error message
 				return DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
 			}
@@ -444,7 +444,7 @@
 			if ((_m[tile].m5 & 0xF8) != 0xE0)
 				return CMD_ERROR;
 
-			if ( ((_m[tile].m5 & 1) ? 1 : 2) != trackbit )
+			if ((_m[tile].m5 & 1 ? TRACK_BIT_DIAG1 : TRACK_BIT_DIAG2) != trackbit)
 				return CMD_ERROR;
 
 			if (!(flags & DC_EXEC))