mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#GROUP small fix for GetAverageCoordinate()
This commit is contained in:
parent
7464406a17
commit
531132e8a7
@ -1132,8 +1132,9 @@ function GROUP:GetAverageVec3()
|
|||||||
-- Average.
|
-- Average.
|
||||||
local Vec3={x=x/n, y=y/n, z=z/n} --DCS#Vec3
|
local Vec3={x=x/n, y=y/n, z=z/n} --DCS#Vec3
|
||||||
return Vec3
|
return Vec3
|
||||||
|
else
|
||||||
|
return self:GetVec3()
|
||||||
end
|
end
|
||||||
return nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.
|
--- Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.
|
||||||
@ -1166,10 +1167,15 @@ function GROUP:GetAverageCoordinate()
|
|||||||
local Heading = self:GetHeading()
|
local Heading = self:GetHeading()
|
||||||
coord.Heading = Heading
|
coord.Heading = Heading
|
||||||
return coord
|
return coord
|
||||||
|
else
|
||||||
|
local coord = self:GetCoordinate()
|
||||||
|
if coord then
|
||||||
|
return coord
|
||||||
else
|
else
|
||||||
BASE:E( { "Cannot GetAverageCoordinate", Group = self, Alive = self:IsAlive() } )
|
BASE:E( { "Cannot GetAverageCoordinate", Group = self, Alive = self:IsAlive() } )
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns a COORDINATE object indicating the point of the first UNIT of the GROUP within the mission.
|
--- Returns a COORDINATE object indicating the point of the first UNIT of the GROUP within the mission.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user