Update Event.lua

- Set `Event.IniGroupName` from db in case group does not exist any more
This commit is contained in:
Frank 2024-11-15 23:21:50 +01:00
parent 6c773786d2
commit dce9631399

View File

@ -1329,6 +1329,7 @@ function EVENT:onEvent( Event )
end
Event.IniDCSGroupName = Event.IniUnit and Event.IniUnit.GroupName or ""
Event.IniGroupName=Event.IniDCSGroupName --At least set the group name because group might not exist any more
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
Event.IniDCSGroupName = Event.IniDCSGroup:getName()
Event.IniGroup = GROUP:FindByName( Event.IniDCSGroupName )