#CTLD Added self.TroopUnloadDistGround = 1.5, and self.TroopUnloadDistHover = 5,

#CSAR Added option to switch off ADF beacons
This commit is contained in:
Applevangelist
2024-08-20 10:47:28 +02:00
parent 80df849d18
commit 504142c585
2 changed files with 21 additions and 13 deletions

View File

@@ -773,6 +773,8 @@ do
-- my_ctld.RadioSound = "beacon.ogg" -- -- this sound will be hearable if you tune in the beacon frequency. Add the sound file to your miz.
-- my_ctld.RadioSoundFC3 = "beacon.ogg" -- this sound will be hearable by FC3 users (actually all UHF radios); change to something like "beaconsilent.ogg" and add the sound file to your miz if you don't want to annoy FC3 pilots.
-- my_ctld.enableChinookGCLoading = true -- this will effectively suppress the crate load and drop for CTLD_CARGO.Enum.STATIc types for CTLD for the Chinook
-- my_ctld.TroopUnloadDistGround = 1.5 -- If hovering, spawn dropped troops this far away from the helo
-- my_ctld.TroopUnloadDistHover = 5 -- If grounded, spawn dropped troops this far away from the helo
--
-- ## 2.1 CH-47 Chinook support
--
@@ -1208,6 +1210,8 @@ CTLD = {
pickupZones = {},
DynamicCargo = {},
ChinookTroopCircleRadius = 5,
TroopUnloadDistGround = 1.5,
TroopUnloadDistHover = 5,
}
------------------------------
@@ -2935,8 +2939,8 @@ function CTLD:_FindCratesNearby( _group, _unit, _dist, _ignoreweight)
local agl = staticpos.y-landheight
agl = UTILS.Round(agl,2)
local GCloaded = agl > 0 and true or false
if IsNoHook == true then GCloaded = false end
--]]
if IsNoHook == true then GCloaded = false end
--]]
--- Testing
local distance = self:_GetDistance(location,staticpos)
--self:T({name=static:GetName(),IsHook=IsHook,agl=agl,GCloaded=GCloaded,distance=string.format("%.2f",distance or 0)})
@@ -3432,7 +3436,7 @@ function CTLD:_UnloadTroops(Group, Unit)
randomcoord = Group:GetCoordinate()
-- slightly left from us
local Angle = (heading+270)%360
local offset = hoverunload and 1.5 or 5
local offset = hoverunload and self.TroopUnloadDistGround or self.TroopUnloadDistHover
randomcoord:Translate(offset,Angle,nil,true)
end
local tempcount = 0