mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
ZONE: Set down trials for getting a random coordinate on a given land type to 100
Cohort -ensure fallback of mission range
This commit is contained in:
parent
485e2e18bf
commit
472a4883f0
@ -1182,7 +1182,7 @@ end
|
||||
-- @param #ZONE_RADIUS self
|
||||
-- @param #number inner (Optional) Minimal distance from the center of the zone. Default is 0.
|
||||
-- @param #number outer (Optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.
|
||||
-- @param #table surfacetypes (Optional) Table of surface types. Can also be a single surface type. We will try max 1000 times to find the right type!
|
||||
-- @param #table surfacetypes (Optional) Table of surface types. Can also be a single surface type. We will try max 100 times to find the right type!
|
||||
-- @return DCS#Vec2 The random location within the zone.
|
||||
function ZONE_RADIUS:GetRandomVec2(inner, outer, surfacetypes)
|
||||
|
||||
@ -1215,7 +1215,7 @@ function ZONE_RADIUS:GetRandomVec2(inner, outer, surfacetypes)
|
||||
local point=_getpoint()
|
||||
|
||||
if surfacetypes then
|
||||
local N=1 ; local Nmax=1000 ; local gotit=false
|
||||
local N=1 ; local Nmax=100 ; local gotit=false
|
||||
while gotit==false and N<=Nmax do
|
||||
gotit=_checkSurface(point)
|
||||
if gotit then
|
||||
|
||||
@ -141,6 +141,8 @@ function COHORT:New(TemplateGroupName, Ngroups, CohortName)
|
||||
self:SetMissionRange(100)
|
||||
elseif self.category==Group.Category.TRAIN then
|
||||
self:SetMissionRange(100)
|
||||
else
|
||||
self:SetMissionRange(150)
|
||||
end
|
||||
|
||||
-- Units.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user