Fixed a potential glitch.

Now target will ALWAYS be tested too.
This commit is contained in:
FlightControl 2017-03-08 20:49:19 +01:00
parent 894854440b
commit c6ad706c1e
4 changed files with 131 additions and 137 deletions

View File

@ -1088,7 +1088,6 @@ do -- OnPlayerLeaveUnit
end end
--- @param #EVENT self --- @param #EVENT self
-- @param #EVENTDATA Event -- @param #EVENTDATA Event
function EVENT:onEvent( Event ) function EVENT:onEvent( Event )
@ -1250,9 +1249,9 @@ function EVENT:onEvent( Event )
return EventFunction( EventClass, Event ) return EventFunction( EventClass, Event )
end, ErrorHandler ) end, ErrorHandler )
end end
end end
else end
if EventData.EventUnit[Event.TgtDCSUnitName] then if EventData.EventUnit[Event.TgtDCSUnitName] then
-- First test if a EventFunction is Set, otherwise search for the default function -- First test if a EventFunction is Set, otherwise search for the default function
@ -1281,7 +1280,6 @@ function EVENT:onEvent( Event )
end end
end end
end end
end
else else
@ -1315,7 +1313,8 @@ function EVENT:onEvent( Event )
end, ErrorHandler ) end, ErrorHandler )
end end
end end
else end
if EventData.EventGroup[Event.TgtGroupName] then if EventData.EventGroup[Event.TgtGroupName] then
if EventData.EventGroup[Event.TgtGroupName].EventFunction then if EventData.EventGroup[Event.TgtGroupName].EventFunction then
@ -1342,7 +1341,6 @@ function EVENT:onEvent( Event )
end end
end end
end end
end
else else

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170308_2035' ) env.info( 'Moose Generation Timestamp: 20170308_2048' )
local base = _G local base = _G
Include = {} Include = {}
@ -5144,7 +5144,6 @@ do -- OnPlayerLeaveUnit
end end
--- @param #EVENT self --- @param #EVENT self
-- @param #EVENTDATA Event -- @param #EVENTDATA Event
function EVENT:onEvent( Event ) function EVENT:onEvent( Event )
@ -5306,9 +5305,9 @@ function EVENT:onEvent( Event )
return EventFunction( EventClass, Event ) return EventFunction( EventClass, Event )
end, ErrorHandler ) end, ErrorHandler )
end end
end end
else end
if EventData.EventUnit[Event.TgtDCSUnitName] then if EventData.EventUnit[Event.TgtDCSUnitName] then
-- First test if a EventFunction is Set, otherwise search for the default function -- First test if a EventFunction is Set, otherwise search for the default function
@ -5337,7 +5336,6 @@ function EVENT:onEvent( Event )
end end
end end
end end
end
else else
@ -5371,7 +5369,8 @@ function EVENT:onEvent( Event )
end, ErrorHandler ) end, ErrorHandler )
end end
end end
else end
if EventData.EventGroup[Event.TgtGroupName] then if EventData.EventGroup[Event.TgtGroupName] then
if EventData.EventGroup[Event.TgtGroupName].EventFunction then if EventData.EventGroup[Event.TgtGroupName].EventFunction then
@ -5398,7 +5397,6 @@ function EVENT:onEvent( Event )
end end
end end
end end
end
else else

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170308_2035' ) env.info( 'Moose Generation Timestamp: 20170308_2048' )
local base = _G local base = _G
Include = {} Include = {}
@ -5144,7 +5144,6 @@ do -- OnPlayerLeaveUnit
end end
--- @param #EVENT self --- @param #EVENT self
-- @param #EVENTDATA Event -- @param #EVENTDATA Event
function EVENT:onEvent( Event ) function EVENT:onEvent( Event )
@ -5306,9 +5305,9 @@ function EVENT:onEvent( Event )
return EventFunction( EventClass, Event ) return EventFunction( EventClass, Event )
end, ErrorHandler ) end, ErrorHandler )
end end
end end
else end
if EventData.EventUnit[Event.TgtDCSUnitName] then if EventData.EventUnit[Event.TgtDCSUnitName] then
-- First test if a EventFunction is Set, otherwise search for the default function -- First test if a EventFunction is Set, otherwise search for the default function
@ -5337,7 +5336,6 @@ function EVENT:onEvent( Event )
end end
end end
end end
end
else else
@ -5371,7 +5369,8 @@ function EVENT:onEvent( Event )
end, ErrorHandler ) end, ErrorHandler )
end end
end end
else end
if EventData.EventGroup[Event.TgtGroupName] then if EventData.EventGroup[Event.TgtGroupName] then
if EventData.EventGroup[Event.TgtGroupName].EventFunction then if EventData.EventGroup[Event.TgtGroupName].EventFunction then
@ -5398,7 +5397,6 @@ function EVENT:onEvent( Event )
end end
end end
end end
end
else else