mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2025-08-15 06:17:22 +00:00
add a way to stop JTACS from lasing
This commit is contained in:
parent
da7cb7394a
commit
acfbec1e84
12
CTLD.lua
12
CTLD.lua
@ -4330,6 +4330,7 @@ ctld.jtacLaserPoints = {}
|
|||||||
ctld.jtacIRPoints = {}
|
ctld.jtacIRPoints = {}
|
||||||
ctld.jtacSmokeMarks = {}
|
ctld.jtacSmokeMarks = {}
|
||||||
ctld.jtacUnits = {} -- list of JTAC units for f10 command
|
ctld.jtacUnits = {} -- list of JTAC units for f10 command
|
||||||
|
ctld.jtacStop = {} -- jtacs to tell to stop lasing
|
||||||
ctld.jtacCurrentTargets = {}
|
ctld.jtacCurrentTargets = {}
|
||||||
ctld.jtacRadioAdded = {} --keeps track of who's had the radio command added
|
ctld.jtacRadioAdded = {} --keeps track of who's had the radio command added
|
||||||
ctld.jtacGeneratedLaserCodes = {} -- keeps track of generated codes, cycles when they run out
|
ctld.jtacGeneratedLaserCodes = {} -- keeps track of generated codes, cycles when they run out
|
||||||
@ -4338,6 +4339,12 @@ ctld.jtacLaserPointCodes = {}
|
|||||||
|
|
||||||
function ctld.JTACAutoLase(_jtacGroupName, _laserCode, _smoke, _lock, _colour)
|
function ctld.JTACAutoLase(_jtacGroupName, _laserCode, _smoke, _lock, _colour)
|
||||||
|
|
||||||
|
if ctld.jtacStop[_jtacGroupName] == true then
|
||||||
|
ctld.jtacStop[_jtacGroupName] = nil
|
||||||
|
ctld.cleanupJTAC(_jtacGroupName)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if _lock == nil then
|
if _lock == nil then
|
||||||
|
|
||||||
_lock = ctld.JTAC_lock
|
_lock = ctld.JTAC_lock
|
||||||
@ -4501,6 +4508,9 @@ function ctld.JTACAutoLase(_jtacGroupName, _laserCode, _smoke, _lock, _colour)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ctld.JTACAutoLaseStop(_jtacGroupName)
|
||||||
|
ctld.jtacStop[_jtacGroupName] = true
|
||||||
|
end
|
||||||
|
|
||||||
-- used by the timer function
|
-- used by the timer function
|
||||||
function ctld.timerJTACAutoLase(_args)
|
function ctld.timerJTACAutoLase(_args)
|
||||||
@ -5359,4 +5369,4 @@ env.info("CTLD READY")
|
|||||||
-- for key, value in pairs(getmetatable(_spawnedCrate)) do
|
-- for key, value in pairs(getmetatable(_spawnedCrate)) do
|
||||||
-- env.info(tostring(key))
|
-- env.info(tostring(key))
|
||||||
-- env.info(tostring(value))
|
-- env.info(tostring(value))
|
||||||
-- end
|
-- end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user