summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-18 12:20:31 +0000
committerrubidium <rubidium@openttd.org>2008-07-18 12:20:31 +0000
commite48d86fad0a384335fa4c49a4f15032bee54b16e (patch)
tree4078e72d712819e0fd700a261befe428e069ee52 /src
parentb3bafb1d9c3dccbbba461b4c12cdedda08739f41 (diff)
downloadopenttd-e48d86fad0a384335fa4c49a4f15032bee54b16e.tar.xz
(svn r13729) -Fix: assumption that non-north tiles of a house do not have the 1x1 building bit set was flawed with some NewGRFs. This caused the amount of houses to differ, which causes the town radii to differ, which causes desyncs when towns are expanded.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_house.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index cb5ac90df..bef7b3797 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -69,12 +69,8 @@ void UpdateHousesAndTowns()
IncreaseBuildingCount(town, house_id);
if (IsHouseCompleted(t)) town->population += GetHouseSpecs(house_id)->population;
- /* Increase the number of houses for every house tile which
- * has a size bit set. Multi tile buildings have got only
- * one tile with such a bit set, so there is no problem. */
- if (GetHouseSpecs(GetHouseType(t))->building_flags & BUILDING_HAS_1_TILE) {
- town->num_houses++;
- }
+ /* Increase the number of houses for every house, but only once. */
+ if (GetHouseNorthPart(house_id) == 0) town->num_houses++;
}
/* Update the population and num_house dependant values */