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.
This commit is contained in:
Peter Nelson 2024-02-07 22:41:32 +00:00
parent 42a88fc1d6
commit e266604e27
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}