mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#FLIGHTGROUP - avoid nil error on dynamic spawn clients when looking for theri original prarking space
This commit is contained in:
parent
4e024f7173
commit
c3dc055fb2
@ -4667,12 +4667,14 @@ function FLIGHTGROUP:GetParking(airbase)
|
|||||||
local coords={}
|
local coords={}
|
||||||
for clientname, client in pairs(clients) do
|
for clientname, client in pairs(clients) do
|
||||||
local template=_DATABASE:GetGroupTemplateFromUnitName(clientname)
|
local template=_DATABASE:GetGroupTemplateFromUnitName(clientname)
|
||||||
|
if template then
|
||||||
local units=template.units
|
local units=template.units
|
||||||
for i,unit in pairs(units) do
|
for i,unit in pairs(units) do
|
||||||
local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
|
local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
|
||||||
coords[unit.name]=coord
|
coords[unit.name]=coord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return coords
|
return coords
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user