Mercurial > hg > openttd
changeset 11977:5a2c559ba843 draft
(svn r16383) -Fix/Change: Disable multitile houses with non-zero population on additional tiles as they cause desyncs and because the specs do not allow that either.
author | frosch <frosch@openttd.org> |
---|---|
date | Fri, 22 May 2009 18:44:22 +0000 |
parents | 7f11f2a71193 |
children | 2e291154df46 |
files | src/newgrf.cpp |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5844,6 +5844,16 @@ continue; } + /* Some places sum population by only counting north tiles. Other places use all tiles causing desyncs. + * As the newgrf specs define population to be zero for non-north tiles, we just disable the offending house. + * If you want to allow non-zero populations somewhen, make sure to sum the population of all tiles in all places. */ + if (((hs->building_flags & BUILDING_HAS_2_TILES) != 0 && next1->population != 0) || + ((hs->building_flags & BUILDING_HAS_4_TILES) != 0 && (next2->population != 0 || next3->population != 0))) { + hs->enabled = false; + DEBUG(grf, 1, "FinaliseHouseArray: %s defines multitile house %d with non-zero population on additional tiles. Disabling house.", file->filename, hs->local_id); + continue; + } + _house_mngr.SetEntitySpec(hs); if (hs->min_year < min_year) min_year = hs->min_year; }