mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#FG - added nil check on GetClosestAirbase()
This commit is contained in:
parent
6e666b0ac8
commit
ff58a47244
@ -4153,12 +4153,20 @@ function FLIGHTGROUP:GetClosestAirbase()
|
||||
|
||||
local group=self.group --Wrapper.Group#GROUP
|
||||
|
||||
if group and group:IsAlive() then
|
||||
|
||||
local coord=group:GetCoordinate()
|
||||
local coalition=self:GetCoalition()
|
||||
|
||||
local airbase=coord:GetClosestAirbase() --(nil, coalition)
|
||||
|
||||
return airbase
|
||||
|
||||
else
|
||||
|
||||
return nil
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--- Search unoccupied parking spots at the airbase for all flight elements.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user