Changeset - r8468:1874b30da9a2
[Not reviewed]
master
0 1 0
peter1138 - 16 years ago 2008-02-01 22:13:59
peter1138@openttd.org
(svn r12038) -Fix: Change ownership of or remove statues when merging/bankrupting companies.
1 file changed with 13 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/unmovable_cmd.cpp
Show inline comments
 
@@ -449,6 +449,19 @@ static void ChangeTileOwner_Unmovable(Ti
 

	
 
	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);
 
	}
0 comments (0 inline, 0 general)