summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/town_cmd.c b/town_cmd.c
index 73102547b..86bf54124 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -1828,10 +1828,9 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold)
uint dist, best = threshold;
Town *best_town = NULL;
- // 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) ? _m[tile].m3 : GetTileOwner(tile)) == OWNER_TOWN
+ (IsLevelCrossing(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile)) == OWNER_TOWN
))
return GetTown(_m[tile].m2);