summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp10
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;
}