Skip to content

Commit

Permalink
#GROUP small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Applevangelist committed Jun 9, 2024
1 parent ceb77e2 commit 4668132
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Moose Development/Moose/Wrapper/Group.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1207,15 +1207,17 @@ function GROUP:GetCoordinate()
-- no luck, try the API way

local DCSGroup = Group.getByName(self.GroupName)
local DCSUnits = DCSGroup:getUnits() or {}
for _,_unit in pairs(DCSUnits) do
if Object.isExist(_unit) then
local position = _unit:getPosition()
local point = position.p ~= nil and position.p or _unit:GetPoint()
if point then
--self:I(point)
local coord = COORDINATE:NewFromVec3(point)
return coord
if DCSGroup then
local DCSUnits = DCSGroup:getUnits() or {}
for _,_unit in pairs(DCSUnits) do
if Object.isExist(_unit) then
local position = _unit:getPosition()
local point = position.p ~= nil and position.p or _unit:GetPoint()
if point then
--self:I(point)
local coord = COORDINATE:NewFromVec3(point)
return coord
end
end
end
end
Expand Down

0 comments on commit 4668132

Please sign in to comment.