summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-19 19:33:19 +0000
committertron <tron@openttd.org>2006-03-19 19:33:19 +0000
commit75a9419f04bf2256428907ecadd0c7b11887f3ad (patch)
tree1fc31f570bf8d81fb6fc6ab7668ceda386765682 /town_cmd.c
parent9f3aa9057d46e1305452071fa15a74b5d756e917 (diff)
downloadopenttd-75a9419f04bf2256428907ecadd0c7b11887f3ad.tar.xz
(svn r3986) Add [GS]etCrossingRoadOwner
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);