summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-04-25 20:50:13 +0000
committerrubidium <rubidium@openttd.org>2012-04-25 20:50:13 +0000
commit41e5c839e08bfc811b1e8d7272996567776b788f (patch)
treeeb8a74437dd42a7a57e157c6218e96b9df7fbd87 /src/saveload
parentcd50c862944098753c959cc272d62a2ddc212ca8 (diff)
downloadopenttd-41e5c839e08bfc811b1e8d7272996567776b788f.tar.xz
(svn r24179) -Codechange: move some variables of Town to TownCache
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/town_sl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp
index 8ef8068c9..07043bc0a 100644
--- a/src/saveload/town_sl.cpp
+++ b/src/saveload/town_sl.cpp
@@ -32,8 +32,8 @@ void UpdateHousesAndTowns()
/* Reset town population and num_houses */
FOR_ALL_TOWNS(town) {
- town->population = 0;
- town->num_houses = 0;
+ town->cache.population = 0;
+ town->cache.num_houses = 0;
}
for (TileIndex t = 0; t < MapSize(); t++) {
@@ -88,10 +88,10 @@ void UpdateHousesAndTowns()
HouseID house_id = GetCleanHouseType(t);
town = Town::GetByTile(t);
IncreaseBuildingCount(town, house_id);
- if (IsHouseCompleted(t)) town->population += HouseSpec::Get(house_id)->population;
+ if (IsHouseCompleted(t)) town->cache.population += HouseSpec::Get(house_id)->population;
/* Increase the number of houses for every house, but only once. */
- if (GetHouseNorthPart(house_id) == 0) town->num_houses++;
+ if (GetHouseNorthPart(house_id) == 0) town->cache.num_houses++;
}
/* Update the population and num_house dependant values */