From e266604e27c135a579f9e329c9e186a3ee8df3f4 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 7 Feb 2024 22:41:32 +0000 Subject: [PATCH] Change: Don't treat Humans and AIs differently when it comes to deleting houses. `CanDeleteHouse()` allows human players to delete any house, but prevents AI players doing the same. This is an old left-over from before NoAI existed. --- src/newgrf_house.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 6175920ca5..3cc0c6287d 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -513,9 +513,9 @@ bool CanDeleteHouse(TileIndex tile) { const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile)); - /* Humans are always allowed to remove buildings, as is water and disasters and + /* Companies are always allowed to remove buildings, as is water and disasters and * anyone using the scenario editor. */ - if (Company::IsValidHumanID(_current_company) || _current_company == OWNER_WATER || _current_company == OWNER_NONE || _game_mode == GM_EDITOR || _generating_world) { + if (Company::IsValidID(_current_company) || _current_company == OWNER_WATER || _current_company == OWNER_NONE || _game_mode == GM_EDITOR || _generating_world) { return true; }