src/waypoint_gui.cpp
changeset 9978 4c10b20eaf54
parent 9970 8608ca115990
child 9986 4ee5b226abad
--- a/src/waypoint_gui.cpp	Sat Aug 23 00:32:01 2008 +0000
+++ b/src/waypoint_gui.cpp	Sat Aug 23 02:15:46 2008 +0000
@@ -37,7 +37,7 @@
 	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 @@
 	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();