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
@@ -51,7 +51,7 @@ struct StationRect : public Rect {
|
||||
/** Base class for all station-ish types */
|
||||
struct BaseStation : StationPool::PoolItem<&_station_pool> {
|
||||
TileIndex xy; ///< Base tile of the station
|
||||
ViewportSign sign; ///< NOSAVE: Dimensions of sign
|
||||
TrackedViewportSign sign; ///< NOSAVE: Dimensions of sign
|
||||
byte delete_ctr; ///< Delete counter. If greater than 0 then it is decremented until it reaches 0; the waypoint is then is deleted.
|
||||
|
||||
char *name; ///< Custom name
|
||||
|
Reference in New Issue
Block a user