Mercurial > hg > openttd
changeset 17535:29079caa99d6 draft
(svn r22299) -Fix [FS#4581]: Check the availability year of all houses, not just the NewGRF houses, when making sure that at least one is available onwards from year 0
author | planetmaker <planetmaker@openttd.org> |
---|---|
date | Thu, 07 Apr 2011 22:27:54 +0000 |
parents | f1771dc228c2 |
children | a99023ab26fc |
files | src/newgrf.cpp |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -7613,8 +7613,6 @@ * On the other hand, why 1930? Just 'fix' the houses with the lowest * minimum introduction date to 0. */ - Year min_year = MAX_YEAR; - const GRFFile * const *end = _grf_files.End(); for (GRFFile **file = _grf_files.Begin(); file != end; file++) { HouseSpec **&housespec = (*file)->housespec; @@ -7632,9 +7630,10 @@ if (!IsHouseSpecValid(hs, next1, next2, next3, (*file)->filename)) continue; _house_mngr.SetEntitySpec(hs); - if (hs->min_year < min_year) min_year = hs->min_year; - } - } + } + } + + Year min_year = MAX_YEAR; for (int i = 0; i < HOUSE_MAX; i++) { HouseSpec *hs = HouseSpec::Get(i); @@ -7653,6 +7652,7 @@ * building_flags to zero here to make sure any house following * this one in the pool is properly handled as 1x1 house. */ hs->building_flags = TILE_NO_FLAG; + if (hs->min_year < min_year) min_year = hs->min_year; } }