From 74541c1dcca9867c4764d43c1d39f129b52af805 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 4 Jun 2005 12:13:24 +0000 Subject: (svn r2408) Introduce SetTileOwner() and use it --- tunnelbridge_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tunnelbridge_cmd.c') 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); -- cgit v1.2.3-54-g00ecf