mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-20 07:43:07 +00:00
#PLAYERTASKCONTROLLER
* Fix a problem that sometimes the object event is called prior to the SET_CLIENT event for players joining, leading to false negatives on specifically filtered SET_CLIENT objects
This commit is contained in:
@@ -98,7 +98,7 @@ PLAYERTASK = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASK.version="0.1.19"
|
PLAYERTASK.version="0.1.20"
|
||||||
|
|
||||||
--- Generic task condition.
|
--- Generic task condition.
|
||||||
-- @type PLAYERTASK.Condition
|
-- @type PLAYERTASK.Condition
|
||||||
@@ -2195,7 +2195,8 @@ function PLAYERTASKCONTROLLER:_EventHandler(EventData)
|
|||||||
end
|
end
|
||||||
elseif EventData.id == EVENTS.PlayerEnterAircraft and EventData.IniCoalition == self.Coalition then
|
elseif EventData.id == EVENTS.PlayerEnterAircraft and EventData.IniCoalition == self.Coalition then
|
||||||
if EventData.IniPlayerName and EventData.IniGroup then
|
if EventData.IniPlayerName and EventData.IniGroup then
|
||||||
if self.IsClientSet and self.ClientSet:IsNotInSet(CLIENT:FindByName(EventData.IniUnitName)) then
|
--if self.IsClientSet and self.ClientSet:IsNotInSet(CLIENT:FindByName(EventData.IniUnitName)) then
|
||||||
|
if self.IsClientSet and (not self.ClientSet:IsIncludeObject(CLIENT:FindByName(EventData.IniUnitName))) then
|
||||||
self:T(self.lid.."Client not in SET: "..EventData.IniPlayerName)
|
self:T(self.lid.."Client not in SET: "..EventData.IniPlayerName)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -4064,6 +4065,7 @@ function PLAYERTASKCONTROLLER:onafterStart(From, Event, To)
|
|||||||
self:HandleEvent(EVENTS.Crash, self._EventHandler)
|
self:HandleEvent(EVENTS.Crash, self._EventHandler)
|
||||||
self:HandleEvent(EVENTS.PilotDead, self._EventHandler)
|
self:HandleEvent(EVENTS.PilotDead, self._EventHandler)
|
||||||
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
|
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
|
||||||
|
self:SetEventPriority(5)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user