mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(svn r24182) -Fix [FS#5169-ish]: The population of a town was computed incorrectly for overridden houses when loading a game.
This commit is contained in:
parent
dbcc6bdcb4
commit
0d03c1ff85
@ -35,7 +35,7 @@ void RebuildTownCaches()
|
|||||||
for (TileIndex t = 0; t < MapSize(); t++) {
|
for (TileIndex t = 0; t < MapSize(); t++) {
|
||||||
if (!IsTileType(t, MP_HOUSE)) continue;
|
if (!IsTileType(t, MP_HOUSE)) continue;
|
||||||
|
|
||||||
HouseID house_id = GetCleanHouseType(t);
|
HouseID house_id = GetHouseType(t);
|
||||||
town = Town::GetByTile(t);
|
town = Town::GetByTile(t);
|
||||||
IncreaseBuildingCount(town, house_id);
|
IncreaseBuildingCount(town, house_id);
|
||||||
if (IsHouseCompleted(t)) town->cache.population += HouseSpec::Get(house_id)->population;
|
if (IsHouseCompleted(t)) town->cache.population += HouseSpec::Get(house_id)->population;
|
||||||
|
Loading…
Reference in New Issue
Block a user