summaryrefslogtreecommitdiff
path: root/openttd.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 /openttd.c
parent9f3aa9057d46e1305452071fa15a74b5d756e917 (diff)
downloadopenttd-75a9419f04bf2256428907ecadd0c7b11887f3ad.tar.xz
(svn r3986) Add [GS]etCrossingRoadOwner
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openttd.c b/openttd.c
index d1bb13c76..bc928779f 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1002,7 +1002,9 @@ static void ConvertTownOwner(void)
for (tile = 0; tile != MapSize(); tile++) {
if (IsTileType(tile, MP_STREET)) {
- if (IsLevelCrossing(tile) && _m[tile].m3 & 0x80) _m[tile].m3 = OWNER_TOWN;
+ if (IsLevelCrossing(tile) && GetCrossingRoadOwner(tile) & 0x80) {
+ SetCrossingRoadOwner(tile, OWNER_TOWN);
+ }
if (_m[tile].m1 & 0x80) SetTileOwner(tile, OWNER_TOWN);
} else if (IsTileType(tile, MP_TUNNELBRIDGE)) {