road_cmd.c
changeset 1902 5d653da1abb7
parent 1901 fb05044cf5c3
child 1927 4126e0e3e884
--- a/road_cmd.c	Sat Jun 04 11:56:32 2005 +0000
+++ b/road_cmd.c	Sat Jun 04 12:13:24 2005 +0000
@@ -195,7 +195,7 @@
 		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 @@
 			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 @@
 	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 {