calculate town potential population (all houses finished)

--HG--
branch : town-potential
This commit is contained in:
Pavel Stupnikov
2014-03-29 22:42:54 +04:00
parent 2891c32511
commit df7a1a5feb
5 changed files with 9 additions and 3 deletions
+2
View File
@@ -2487,6 +2487,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
/* build the house */
t->cache.num_houses++;
t->cache.potential_pop += hs->population;
/* Special houses that there can be only one of. */
t->flags |= oneof;
@@ -2578,6 +2579,7 @@ void ClearTownHouse(Town *t, TileIndex tile)
}
t->cache.num_houses--;
t->cache.potential_pop -= hs->population;
/* Clear flags for houses that only may exist once/town. */
if (hs->building_flags & BUILDING_IS_CHURCH) {