summaryrefslogtreecommitdiff
path: root/src/waypoint_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index 1f1b81f15..75d9d4798 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -37,7 +37,7 @@ public:
WaypointWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->wp = GetWaypoint(this->window_number);
- this->caption_color = (byte)GetTileOwner(this->wp->xy);
+ this->caption_color = this->wp->owner;
this->flags4 |= WF_DISABLE_VP_SCROLL;
InitializeWindowViewport(this, 3, 17, 254, 86, this->wp->xy, ZOOM_LVL_MIN);
@@ -48,7 +48,7 @@ public:
virtual void OnPaint()
{
/* You can only change your own waypoints */
- this->SetWidgetDisabledState(WAYPVW_RENAME, !CheckTileOwnership(this->wp->xy));
+ this->SetWidgetDisabledState(WAYPVW_RENAME, !CheckOwnership(this->wp->owner));
SetDParam(0, this->wp->index);
this->DrawWidgets();