mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
DATABASE & RAT
- DATABASE: spawned units (ships) are registered as airbases. - RAT v2.3.8: script will not crash if (spawned) AIRBASE cannot be found .
This commit is contained in:
@@ -923,6 +923,12 @@ function DATABASE:_EventOnBirth( Event )
|
||||
if Event.IniObjectCategory == 1 then
|
||||
self:AddUnit( Event.IniDCSUnitName )
|
||||
self:AddGroup( Event.IniDCSGroupName )
|
||||
-- Add airbase if it was spawned later in the mission.
|
||||
local DCSAirbase = Airbase.getByName(Event.IniDCSUnitName)
|
||||
if DCSAirbase then
|
||||
self:I(string.format("Adding airbase %s", tostring(Event.IniDCSUnitName)))
|
||||
self:AddAirbase(Event.IniDCSUnitName)
|
||||
end
|
||||
end
|
||||
end
|
||||
if Event.IniObjectCategory == 1 then
|
||||
|
||||
Reference in New Issue
Block a user