diff options
author | frosch <frosch@openttd.org> | 2009-05-22 18:44:22 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-05-22 18:44:22 +0000 |
commit | 2365d27a4d90ec32b0a9db09fe0fe04e4559911a (patch) | |
tree | dcf7c2b7aa840fb382224c1791e9f731fcaad356 | |
parent | 441011b782294e93b47876f24de96a63da7dd678 (diff) | |
download | openttd-2365d27a4d90ec32b0a9db09fe0fe04e4559911a.tar.xz |
(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.
-rw-r--r-- | src/newgrf.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d5ed0d69c..71cfdd10a 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5844,6 +5844,16 @@ static void FinaliseHouseArray() 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; } |