summaryrefslogtreecommitdiff
path: root/src/waypoint_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index 3400a7df4..fa4deaac6 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -67,7 +67,7 @@ public:
}
this->FinishInitNested(window_number);
- if (this->wp->owner != OWNER_NONE) this->owner = this->wp->owner;
+ this->owner = this->wp->owner;
this->flags |= WF_DISABLE_VP_SCROLL;
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_W_VIEWPORT);
@@ -78,13 +78,7 @@ public:
~WaypointWindow()
{
- Owner owner = this->owner;
-
- /* Buoys have no owner and can be used by everyone. Show only 'our' vehicles */
- if (!Company::IsValidID(owner)) owner = _local_company;
-
- /* Well, spectators otoh */
- if (Company::IsValidID(owner)) DeleteWindowById(GetWindowClassForVehicleType(this->vt), VehicleListIdentifier(VL_STATION_LIST, this->vt, owner, this->window_number).Pack(), false);
+ DeleteWindowById(GetWindowClassForVehicleType(this->vt), VehicleListIdentifier(VL_STATION_LIST, this->vt, this->owner, this->window_number).Pack(), false);
}
virtual void SetStringParameters(int widget) const