Codechange: remove has_newhouses global

This commit is contained in:
Yexo
2020-05-29 22:31:14 +02:00
committed by Yexo
parent 1c0ba07c3c
commit a82572d0f5
4 changed files with 2 additions and 12 deletions

View File

@@ -2492,8 +2492,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
if (t->cache.building_counts.id_count[i] == UINT16_MAX) continue;
}
/* Without NewHouses, all houses have probability '1' */
uint cur_prob = (_loaded_newgrf_features.has_newhouses ? hs->probability : 1);
uint cur_prob = hs->probability;
probability_max += cur_prob;
probs[num] = cur_prob;
houses[num++] = (HouseID)i;
@@ -2526,8 +2525,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
const HouseSpec *hs = HouseSpec::Get(house);
if (_loaded_newgrf_features.has_newhouses && !_generating_world &&
_game_mode != GM_EDITOR && (hs->extra_flags & BUILDING_IS_HISTORICAL) != 0) {
if (!_generating_world && _game_mode != GM_EDITOR && (hs->extra_flags & BUILDING_IS_HISTORICAL) != 0) {
continue;
}