(svn r14135) -Codechange: Add owner to waypoints. Previously, it was guessed from rail underneath it.

This commit is contained in:
belugas
2008-08-23 02:15:46 +00:00
parent b6ae11f3ae
commit 23b1f53ff6
7 changed files with 128 additions and 116 deletions

View File

@@ -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();