-- Fixed Designate menus for UNITS and TYPES.

-- Fixed error in Detection Units and Types, when the last unit is destroyed in teh collection, it would crash the logic.
-- In the event processing, no error to be generated if the target static is not found.
This commit is contained in:
FlightControl_Master
2018-03-26 05:33:17 +02:00
parent bd4ad42fcf
commit fa92615f5d
3 changed files with 29 additions and 9 deletions

View File

@@ -826,7 +826,7 @@ function EVENT:onEvent( Event )
Event.TgtDCSUnit = Event.target
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
Event.TgtUnitName = Event.TgtDCSUnitName
Event.TgtUnit = STATIC:FindByName( Event.TgtDCSUnitName )
Event.TgtUnit = STATIC:FindByName( Event.TgtDCSUnitName, false )
Event.TgtCoalition = Event.TgtDCSUnit:getCoalition()
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()