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
commit23b1f53ff65286b47284d7a75d1b6e9288c3eb39 (patch)
tree3c9c32817a645ea313b3ef2cc9da69a40f7820ea /src/waypoint_gui.cpp
parentb6ae11f3aecb92104bcd4cbefd37a3ed32eeb8af (diff)
downloadopenttd-23b1f53ff65286b47284d7a75d1b6e9288c3eb39.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();