From 9d035df146a1e74cb0a6233da8da648e96612847 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 18 Jul 2008 12:20:31 +0000 Subject: (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. --- src/newgrf_house.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/newgrf_house.cpp') 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 */ -- cgit v1.2.3-54-g00ecf