From 7dc212edeba11703d3b8a5f4105dbb0102f122ab Mon Sep 17 00:00:00 2001 From: belugas Date: Sat, 23 Aug 2008 02:15:46 +0000 Subject: (svn r14135) -Codechange: Add owner to waypoints. Previously, it was guessed from rail underneath it. --- src/waypoint_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/waypoint_gui.cpp') 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(); -- cgit v1.2.3-54-g00ecf