1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 00:49:11 +00:00

Fix #7478: Don't remove NewGRF objects on company take-over. (#7483)

This commit is contained in:
2019-04-08 19:20:43 +01:00
committed by GitHub
parent bc9b47d2e5
commit 812886ca61

View File

@@ -768,9 +768,10 @@ static void ChangeTileOwner_Object(TileIndex tile, Owner old_owner, Owner new_ow
bool do_clear = false;
if (IsObjectType(tile, OBJECT_OWNED_LAND) && new_owner != INVALID_OWNER) {
ObjectType type = GetObjectType(tile);
if ((type == OBJECT_OWNED_LAND || type >= NEW_OBJECT_OFFSET) && new_owner != INVALID_OWNER) {
SetTileOwner(tile, new_owner);
} else if (IsObjectType(tile, OBJECT_STATUE)) {
} else if (type == OBJECT_STATUE) {
Town *t = Object::GetByTile(tile)->town;
ClrBit(t->statues, old_owner);
if (new_owner != INVALID_OWNER && !HasBit(t->statues, new_owner)) {