mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r22131) -Fix: Spectators had trouble closing buoy windows. (Terkhen)
This commit is contained in:
parent
678cf3553f
commit
facf400d27
|
@ -79,8 +79,12 @@ public:
|
||||||
~WaypointWindow()
|
~WaypointWindow()
|
||||||
{
|
{
|
||||||
Owner owner = this->owner;
|
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;
|
if (!Company::IsValidID(owner)) owner = _local_company;
|
||||||
DeleteWindowById(GetWindowClassForVehicleType(this->vt), VehicleListIdentifier(VL_STATION_LIST, this->vt, owner, this->window_number).Pack(), false);
|
|
||||||
|
/* Well, spectators otoh */
|
||||||
|
if (Company::IsValidID(owner)) DeleteWindowById(GetWindowClassForVehicleType(this->vt), VehicleListIdentifier(VL_STATION_LIST, this->vt, owner, this->window_number).Pack(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetStringParameters(int widget) const
|
virtual void SetStringParameters(int widget) const
|
||||||
|
|
Loading…
Reference in New Issue