diff options
-rw-r--r-- | src/waypoint_gui.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index b05172468..070e4eea7 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -46,7 +46,11 @@ private: */ TileIndex GetCenterTile() const { - return this->wp->IsInUse() ? this->wp->train_station.GetCenterTile() : this->wp->xy; + if (!this->wp->IsInUse()) return this->wp->xy; + + TileArea ta; + this->wp->GetTileArea(&ta, this->vt == VEH_TRAIN ? STATION_WAYPOINT : STATION_BUOY); + return ta.GetCenterTile(); } public: |