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.
This commit is contained in:

committed by
GitHub

parent
f91c701ffe
commit
9900af38f5
@@ -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
|
||||
|
Reference in New Issue
Block a user