(svn r2408) Introduce SetTileOwner() and use it

This commit is contained in:
tron
2005-06-04 12:13:24 +00:00
parent 0c4ecbe9ec
commit 74541c1dcc
11 changed files with 37 additions and 29 deletions

View File

@@ -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)
}