mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
CSAR
This commit is contained in:
parent
9721f743a0
commit
44c59b97e8
@ -2152,20 +2152,24 @@ function CSAR:_GetClosestMASH(_heli)
|
||||
end
|
||||
|
||||
for _, _mashUnit in pairs(_mashes) do
|
||||
if _mashUnit and _mashUnit:IsAlive() then
|
||||
local _mashcoord = _mashUnit:GetCoordinate()
|
||||
local _mashcoord
|
||||
if _mashUnit and (not _mashUnit:IsInstanceOf("ZONE_BASE")) and _mashUnit:IsAlive() then
|
||||
_mashcoord = _mashUnit:GetCoordinate()
|
||||
elseif _mashUnit and _mashUnit:IsInstanceOf("ZONE_BASE") then
|
||||
_mashcoord = _mashUnit:GetCoordinate()
|
||||
end
|
||||
_distance = self:_GetDistance(_helicoord, _mashcoord)
|
||||
if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then
|
||||
_shortestDistance = _distance
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if _shortestDistance ~= -1 then
|
||||
return _shortestDistance
|
||||
else
|
||||
return -1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- (Internal) Display onboarded rescued pilots.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user