diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-01 23:17:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-01 23:17:33 +0100 |
commit | 9900af38f58c84a90bd1a3830b9acd08438c46c5 (patch) | |
tree | de630b1f7e806d1b4c1639031111151292863951 /src/town.h | |
parent | f91c701ffebe098f05b237642dd37002181f1a7f (diff) | |
download | openttd-9900af38f58c84a90bd1a3830b9acd08438c46c5.tar.xz |
Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849)
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.
By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
Diffstat (limited to 'src/town.h')
-rw-r--r-- | src/town.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town.h b/src/town.h index 818ee643b..d07f9cc23 100644 --- a/src/town.h +++ b/src/town.h @@ -43,7 +43,7 @@ extern TownPool _town_pool; struct TownCache { uint32 num_houses; ///< Amount of houses uint32 population; ///< Current population of people - ViewportSign sign; ///< Location of name sign, UpdateVirtCoord updates this + TrackedViewportSign sign; ///< Location of name sign, UpdateVirtCoord updates this PartOfSubsidy part_of_subsidy; ///< Is this town a source/destination of a subsidy? uint32 squared_town_zone_radius[HZB_END]; ///< UpdateTownRadius updates this given the house count BuildingCounts<uint16> building_counts; ///< The number of each type of building in the town |