mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r12038) -Fix: Change ownership of or remove statues when merging/bankrupting companies.
This commit is contained in:
parent
7ce12e50da
commit
09ce7f76e9
@ -449,6 +449,19 @@ static void ChangeTileOwner_Unmovable(TileIndex tile, PlayerID old_player, Playe
|
||||
|
||||
if (IsOwnedLand(tile) && new_player != PLAYER_SPECTATOR) {
|
||||
SetTileOwner(tile, new_player);
|
||||
} else if (IsStatueTile(tile)) {
|
||||
TownID town = GetStatueTownID(tile);
|
||||
Town *t = GetTown(town);
|
||||
ClrBit(t->statues, old_player);
|
||||
if (new_player != PLAYER_SPECTATOR && !HasBit(t->statues, new_player)) {
|
||||
/* Transfer ownership to the new company */
|
||||
SetBit(t->statues, new_player);
|
||||
SetTileOwner(tile, new_player);
|
||||
} else {
|
||||
DoClearSquare(tile);
|
||||
}
|
||||
|
||||
InvalidateWindow(WC_TOWN_AUTHORITY, town);
|
||||
} else {
|
||||
DoClearSquare(tile);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user