#SET_UNIT - fix GetCoordinate()

This commit is contained in:
Applevangelist 2022-10-14 16:18:53 +02:00
parent bdd40fdf7d
commit a6bddc5aca

View File

@ -276,9 +276,9 @@ do -- SET_BASE
-- @param Core.Set#SET_BASE SetToAdd Set to add.
-- @return #SET_BASE self
function SET_BASE:AddSet(SetToAdd)
if not SetToAdd then return self end
for _,ObjectB in pairs(SetToAdd.Set) do
self:AddObject(ObjectB)
end
@ -2639,8 +2639,10 @@ do -- SET_UNIT
-- @return Core.Point#COORDINATE The center coordinate of all the units in the set, including heading in degrees and speed in mps in case of moving units.
function SET_UNIT:GetCoordinate()
local Coordinate = self:GetFirst():GetCoordinate()
local Coordinate = self:GetRandom():GetCoordinate()
--self:F({Coordinate:GetVec3()})
local x1 = Coordinate.x
local x2 = Coordinate.x
local y1 = Coordinate.y