mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Solving the SCORING menu not anymore accessible due to S_EVENT_PLAYER_ENTER_UNIT bug in DCS (not fired anymore in MP when a player joins a slot).
This commit is contained in:
parent
09d02e18cf
commit
95112e8818
@ -315,8 +315,8 @@ function SET_BASE:_FilterStart()
|
|||||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||||
|
|
||||||
-- Follow alive players and clients
|
-- Follow alive players and clients
|
||||||
self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
|
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
|
||||||
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
|
--self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
|
||||||
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
@ -282,7 +282,7 @@ function SCORING:New( GameName )
|
|||||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||||
self:HandleEvent( EVENTS.Hit, self._EventOnHit )
|
self:HandleEvent( EVENTS.Hit, self._EventOnHit )
|
||||||
self:HandleEvent( EVENTS.Birth )
|
self:HandleEvent( EVENTS.Birth )
|
||||||
self:HandleEvent( EVENTS.PlayerEnterUnit )
|
--self:HandleEvent( EVENTS.PlayerEnterUnit )
|
||||||
self:HandleEvent( EVENTS.PlayerLeaveUnit )
|
self:HandleEvent( EVENTS.PlayerLeaveUnit )
|
||||||
|
|
||||||
-- During mission startup, especially for single player,
|
-- During mission startup, especially for single player,
|
||||||
@ -842,11 +842,27 @@ end
|
|||||||
--- Handles the OnPlayerEnterUnit event for the scoring.
|
--- Handles the OnPlayerEnterUnit event for the scoring.
|
||||||
-- @param #SCORING self
|
-- @param #SCORING self
|
||||||
-- @param Core.Event#EVENTDATA Event
|
-- @param Core.Event#EVENTDATA Event
|
||||||
function SCORING:OnEventPlayerEnterUnit( Event )
|
--function SCORING:OnEventPlayerEnterUnit( Event )
|
||||||
|
-- if Event.IniUnit then
|
||||||
|
-- self:_AddPlayerFromUnit( Event.IniUnit )
|
||||||
|
-- self:SetScoringMenu( Event.IniGroup )
|
||||||
|
-- end
|
||||||
|
--end
|
||||||
|
|
||||||
|
--- Handles the OnBirth event for the scoring.
|
||||||
|
-- @param #SCORING self
|
||||||
|
-- @param Core.Event#EVENTDATA Event
|
||||||
|
function SCORING:OnEventBirth( Event )
|
||||||
|
|
||||||
if Event.IniUnit then
|
if Event.IniUnit then
|
||||||
|
if Event.IniObjectCategory == 1 then
|
||||||
|
local PlayerName = Event.IniUnit:GetPlayerName()
|
||||||
|
if PlayerName ~= "" then
|
||||||
self:_AddPlayerFromUnit( Event.IniUnit )
|
self:_AddPlayerFromUnit( Event.IniUnit )
|
||||||
self:SetScoringMenu( Event.IniGroup )
|
self:SetScoringMenu( Event.IniGroup )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Handles the OnPlayerLeaveUnit event for the scoring.
|
--- Handles the OnPlayerLeaveUnit event for the scoring.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user