summaryrefslogtreecommitdiff
path: root/src/base_station_base.h
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-01 23:17:33 +0100
committerGitHub <noreply@github.com>2019-12-01 23:17:33 +0100
commit9900af38f58c84a90bd1a3830b9acd08438c46c5 (patch)
treede630b1f7e806d1b4c1639031111151292863951 /src/base_station_base.h
parentf91c701ffebe098f05b237642dd37002181f1a7f (diff)
downloadopenttd-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/base_station_base.h')
-rw-r--r--src/base_station_base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base_station_base.h b/src/base_station_base.h
index 112fa722b..a23a7bf51 100644
--- a/src/base_station_base.h
+++ b/src/base_station_base.h
@@ -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