From a6bddc5acafbf3af5e248e26e7b102226d9d3684 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 14 Oct 2022 16:18:53 +0200 Subject: [PATCH] #SET_UNIT - fix GetCoordinate() --- Moose Development/Moose/Core/Set.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 17d05ae57..3c40434c0 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -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