(svn r24179) -Codechange: move some variables of Town to TownCache

This commit is contained in:
rubidium
2012-04-25 20:50:13 +00:00
parent 21f63bd589
commit 76d5833650
13 changed files with 108 additions and 102 deletions

View File

@@ -493,7 +493,7 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
company = OWNER_TOWN;
/* If we are not within a town, we are not owned by the town */
if (town == NULL || DistanceSquare(tile, town->xy) > town->squared_town_zone_radius[HZB_TOWN_EDGE]) {
if (town == NULL || DistanceSquare(tile, town->xy) > town->cache.squared_town_zone_radius[HZB_TOWN_EDGE]) {
company = OWNER_NONE;
}
}