summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.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 /tunnelbridge_cmd.c
parent0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (diff)
downloadopenttd-74541c1dcca9867c4764d43c1d39f129b52af805.tar.xz
(svn r2408) Introduce SetTileOwner() and use it
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 7460f7b6e..1aa5a4935 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -711,7 +711,7 @@ static int32 DoClearBridge(uint tile, uint32 flags)
if (flags & DC_EXEC) {
_map5[tile] = _map5[tile] & ~0x38;
- _map_owner[tile] = OWNER_NONE;
+ SetTileOwner(tile, OWNER_NONE);
MarkTileDirtyByTile(tile);
}
return cost;
@@ -726,7 +726,7 @@ static int32 DoClearBridge(uint tile, uint32 flags)
cost = _price.clear_water;
if (flags & DC_EXEC) {
_map5[tile] = _map5[tile] & ~0x38;
- _map_owner[tile] = OWNER_NONE;
+ SetTileOwner(tile, OWNER_NONE);
MarkTileDirtyByTile(tile);
}
return cost;
@@ -1373,7 +1373,7 @@ static void ChangeTileOwner_TunnelBridge(uint tile, byte old_player, byte new_pl
if (!IsTileOwner(tile, old_player)) return;
if (new_player != 255) {
- _map_owner[tile] = new_player;
+ SetTileOwner(tile, new_player);
} else {
if((_map5[tile] & 0xC0)==0xC0) {
// the stuff BELOW the middle part is owned by the deleted player.
@@ -1382,7 +1382,7 @@ static void ChangeTileOwner_TunnelBridge(uint tile, byte old_player, byte new_pl
_map5[tile] &= ~(1 << 5 | 1 << 4 | 1 << 3); // no transport route under bridge anymore..
} else {
// for road, change the owner of the road to local authority
- _map_owner[tile] = OWNER_NONE;
+ SetTileOwner(tile, OWNER_NONE);
}
} else {
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);