summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-06-07 21:37:00 +0000
committerDarkvater <Darkvater@openttd.org>2005-06-07 21:37:00 +0000
commitc37cf285cefa69d09a50f3e5b609798766173d5b (patch)
tree25e2a197e45756770b59b3d230e466026cb1ca95 /town_cmd.c
parentd2364f1d51ed868d6c9f0336c57dde46aef5fc3c (diff)
downloadopenttd-c37cf285cefa69d09a50f3e5b609798766173d5b.tar.xz
(svn r2433) - CodeChange: unmagicify all road/train crossings with IsLevelCrossing() function (peter1138)
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/town_cmd.c b/town_cmd.c
index 4b13be7b6..e659033d9 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) &&
- ((_map5[tile] & 0xF0) != 0x10 ? GetTileOwner(tile) : _map3_lo[tile]) == OWNER_TOWN
+ (IsLevelCrossing(tile) ? _map3_lo[tile] == OWNER_TOWN : GetTileOwner(tile))
))
return GetTown(_map2[tile]);