diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 145c13155..0919d6e7d 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -46,7 +46,7 @@ -- === -- -- ### Author: **FlightControl** --- ### Contributions: +-- ### Contributions: **Applevangelist**, **FunkyFranky** -- -- === -- @@ -1290,13 +1290,13 @@ end -- @return DCS#Vec2 The random location within the zone. function ZONE_RADIUS:GetRandomVec2(inner, outer, surfacetypes) - local Vec2 = self:GetVec2() - local _inner = inner or 0 - local _outer = outer or self:GetRadius() + local Vec2 = self:GetVec2() + local _inner = inner or 0 + local _outer = outer or self:GetRadius() - if surfacetypes and type(surfacetypes)~="table" then + if surfacetypes and type(surfacetypes)~="table" then surfacetypes={surfacetypes} - end + end local function _getpoint() local point = {} @@ -1316,10 +1316,10 @@ function ZONE_RADIUS:GetRandomVec2(inner, outer, surfacetypes) return false end - local point=_getpoint() + local point=_getpoint() - if surfacetypes then - local N=1 ; local Nmax=100 ; local gotit=false + if surfacetypes then + local N=1 ; local Nmax=100 ; local gotit=false while gotit==false and N<=Nmax do gotit=_checkSurface(point) if gotit then @@ -1331,7 +1331,7 @@ function ZONE_RADIUS:GetRandomVec2(inner, outer, surfacetypes) end end - return point + return point end --- Returns a @{Core.Point#POINT_VEC2} object reflecting a random 2D location within the zone. diff --git a/Moose Development/Moose/Functional/ZoneGoal.lua b/Moose Development/Moose/Functional/ZoneGoal.lua index eb72c4221..3ed9554f9 100644 --- a/Moose Development/Moose/Functional/ZoneGoal.lua +++ b/Moose Development/Moose/Functional/ZoneGoal.lua @@ -8,7 +8,7 @@ -- === -- -- ### Author: **FlightControl** --- ### Contributions: **funkyfranky** +-- ### Contributions: **funkyfranky**, **Applevangelist** -- -- === -- @@ -56,7 +56,7 @@ do -- Zone --- ZONE_GOAL Constructor. -- @param #ZONE_GOAL self - -- @param Core.Zone#ZONE_RADIUS Zone A @{Zone} object with the goal to be achieved. + -- @param Core.Zone#ZONE_RADIUS Zone A @{Zone} object with the goal to be achieved. Alternatively, can be handed as the name of late activated group describing a @{ZONE_POLYGON} with its waypoints. -- @return #ZONE_GOAL function ZONE_GOAL:New( Zone )