(svn r2434) Fix some defects in r2433
authortron
Wed, 08 Jun 2005 09:03:29 +0000
changeset 1928 1aab00f664d7
parent 1927 1181e7652e2f
child 1929 b16855267e15
(svn r2434) Fix some defects in r2433
rail_cmd.c
town_cmd.c
--- a/rail_cmd.c	Tue Jun 07 21:37:00 2005 +0000
+++ b/rail_cmd.c	Wed Jun 08 09:03:29 2005 +0000
@@ -374,7 +374,7 @@
 				break;
 			}
 
-			if (IsLevelCrossing(tile) == 0x10 && (m5 & 0x08 ? 1 : 2) == rail_bit)
+			if (IsLevelCrossing(tile) && (m5 & 0x08 ? 1 : 2) == rail_bit)
 				return_cmd_error(STR_1007_ALREADY_BUILT);
 			/* FALLTHROUGH */
 
--- a/town_cmd.c	Tue Jun 07 21:37:00 2005 +0000
+++ b/town_cmd.c	Wed Jun 08 09:03:29 2005 +0000
@@ -1841,7 +1841,7 @@
 	// XXX - Fix this so for a given tiletype the owner of the type is in the same variable
 	if (IsTileType(tile, MP_HOUSE) || (
 				IsTileType(tile, MP_STREET) &&
-				(IsLevelCrossing(tile) ? _map3_lo[tile] == OWNER_TOWN : GetTileOwner(tile))
+				(IsLevelCrossing(tile) ? _map3_lo[tile] : GetTileOwner(tile)) == OWNER_TOWN
 			))
 		return GetTown(_map2[tile]);