summaryrefslogtreecommitdiff
path: root/src/waypoint_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-08-23 02:15:46 +0000
committerbelugas <belugas@openttd.org>2008-08-23 02:15:46 +0000
commit7dc212edeba11703d3b8a5f4105dbb0102f122ab (patch)
tree3c9c32817a645ea313b3ef2cc9da69a40f7820ea /src/waypoint_gui.cpp
parentf625ecbeba53c4d25cd2ad2755924448522af8e9 (diff)
downloadopenttd-7dc212edeba11703d3b8a5f4105dbb0102f122ab.tar.xz
(svn r14135) -Codechange: Add owner to waypoints. Previously, it was guessed from rail underneath it.
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();