summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-08 09:03:29 +0000
committertron <tron@openttd.org>2005-06-08 09:03:29 +0000
commitaab5561c550c3a17ee983c44456ea659cf471be8 (patch)
tree0f9be1cf6d459093d340f2f22eb7cecae8935cd6
parentc37cf285cefa69d09a50f3e5b609798766173d5b (diff)
downloadopenttd-aab5561c550c3a17ee983c44456ea659cf471be8.tar.xz
(svn r2434) Fix some defects in r2433
-rw-r--r--rail_cmd.c2
-rw-r--r--town_cmd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 0fcec1455..a5c9dc8f3 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -374,7 +374,7 @@ int32 CmdBuildSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2)
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 */
diff --git a/town_cmd.c b/town_cmd.c
index e659033d9..afe80e2b4 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -1841,7 +1841,7 @@ Town *ClosestTownFromTile(uint tile, uint threshold)
// 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]);