summaryrefslogtreecommitdiff
path: root/road_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 /road_cmd.c
parent0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (diff)
downloadopenttd-74541c1dcca9867c4764d43c1d39f129b52af805.tar.xz
(svn r2408) Introduce SetTileOwner() and use it
Diffstat (limited to 'road_cmd.c')
-rw-r--r--road_cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/road_cmd.c b/road_cmd.c
index 26c96bade..f48fb4461 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -195,7 +195,7 @@ int32 CmdRemoveRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM);
_map5[tile] = ti.map5 & 0xC7;
- _map_owner[tile] = OWNER_NONE;
+ SetTileOwner(tile, OWNER_NONE);
MarkTileDirtyByTile(tile);
}
return cost;
@@ -470,7 +470,7 @@ do_clear:;
SetTileType(tile, MP_STREET);
_map5[tile] = 0;
_map2[tile] = p2;
- _map_owner[tile] = _current_player;
+ SetTileOwner(tile, _current_player);
}
_map5[tile] |= (byte)pieces;
@@ -1148,14 +1148,14 @@ static void ChangeTileOwner_Road(uint tile, byte old_player, byte new_player)
if (!IsTileOwner(tile, old_player)) return;
if (new_player != 255) {
- _map_owner[tile] = new_player;
+ SetTileOwner(tile, new_player);
} else {
b = _map5[tile]&0xF0;
if (b == 0) {
- _map_owner[tile] = OWNER_NONE;
+ SetTileOwner(tile, OWNER_NONE);
} else if (b == 0x10) {
_map5[tile] = (_map5[tile]&8) ? 0x5 : 0xA;
- _map_owner[tile] = _map3_lo[tile];
+ SetTileOwner(tile, _map3_lo[tile]);
_map3_lo[tile] = 0;
_map3_hi[tile] &= 0x80;
} else {