(svn r2408) Introduce SetTileOwner() and use it

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

View File

@@ -2827,7 +2827,7 @@ void BuildOilRig(uint tile)
SetTileType(tile, MP_STATION);
_map5[tile] = 0x4B;
_map_owner[tile] = OWNER_NONE;
SetTileOwner(tile, OWNER_NONE);
_map3_lo[tile] = 0;
_map3_hi[tile] = 0;
_map2[tile] = st->index;
@@ -2884,7 +2884,7 @@ static void ChangeTileOwner_Station(uint tile, byte old_player, byte new_player)
if (new_player != 255) {
Station *st = GetStation(_map2[tile]);
_map_owner[tile] = new_player;
SetTileOwner(tile, new_player);
st->owner = new_player;
_global_station_sort_dirty = true; // transfer ownership of station to another player
InvalidateWindowClasses(WC_STATION_LIST);