summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-04 12:13:24 +0000
committertron <tron@openttd.org>2005-06-04 12:13:24 +0000
commit74541c1dcca9867c4764d43c1d39f129b52af805 (patch)
tree11a93b883c78b67c9c0fd0e09265d93450542264 /openttd.c
parent0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (diff)
downloadopenttd-74541c1dcca9867c4764d43c1d39f129b52af805.tar.xz
(svn r2408) Introduce SetTileOwner() and use it
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/openttd.c b/openttd.c
index ffd159aa3..c1205eda3 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1188,11 +1188,9 @@ static void ConvertTownOwner(void)
if ((_map5[tile] & 0xF0) == 0x10 && _map3_lo[tile] & 0x80)
_map3_lo[tile] = OWNER_TOWN;
- if (_map_owner[tile] & 0x80)
- _map_owner[tile] = OWNER_TOWN;
+ if (_map_owner[tile] & 0x80) SetTileOwner(tile, OWNER_TOWN);
} else if (IsTileType(tile, MP_TUNNELBRIDGE)) {
- if (_map_owner[tile] & 0x80)
- _map_owner[tile] = OWNER_TOWN;
+ if (_map_owner[tile] & 0x80) SetTileOwner(tile, OWNER_TOWN);
}
}
}
@@ -1300,7 +1298,7 @@ bool AfterLoadGame(uint version)
BEGIN_TILE_LOOP(tile_cur, w, h, tile)
if (IsTileType(tile_cur, MP_WATER) && GetTileOwner(tile_cur) >= MAX_PLAYERS)
- _map_owner[tile_cur] = OWNER_WATER;
+ SetTileOwner(tile_cur, OWNER_WATER);
END_TILE_LOOP(tile_cur, w, h, tile)
}