mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPSGROUP
Track
This commit is contained in:
@@ -150,7 +150,7 @@ FLIGHTGROUP = {
|
|||||||
playerWarnings = {},
|
playerWarnings = {},
|
||||||
prohibitAB = false,
|
prohibitAB = false,
|
||||||
jettisonEmptyTanks = true,
|
jettisonEmptyTanks = true,
|
||||||
jettisonWeapons = true, -- that's actually a negative option like prohibitAB
|
jettisonWeapons = true, -- that's actually a negative option like prohibitAB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1202,6 +1202,36 @@ function FLIGHTGROUP:Status()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Track flight
|
||||||
|
---
|
||||||
|
if false then
|
||||||
|
|
||||||
|
for _,_element in pairs(self.elements) do
|
||||||
|
local element=_element --Ops.OpsGroup#OPSGROUP.Element
|
||||||
|
|
||||||
|
local unit=element.unit
|
||||||
|
|
||||||
|
if unit and unit:IsAlive() then
|
||||||
|
|
||||||
|
local vec3=unit:GetVec3()
|
||||||
|
|
||||||
|
if vec3 and element.pos then
|
||||||
|
|
||||||
|
local id=UTILS.GetMarkID()
|
||||||
|
|
||||||
|
trigger.action.lineToAll(-1, id, vec3, element.pos, {1,1,1,0.5}, 1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
element.pos=vec3
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Fuel State
|
-- Fuel State
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -899,7 +899,24 @@ function MSRS:_ExecCommand(command)
|
|||||||
-- Remove file in 1 second.
|
-- Remove file in 1 second.
|
||||||
timer.scheduleFunction(os.remove, filename, timer.getTime()+1)
|
timer.scheduleFunction(os.remove, filename, timer.getTime()+1)
|
||||||
timer.scheduleFunction(os.remove, filenvbs, timer.getTime()+1)
|
timer.scheduleFunction(os.remove, filenvbs, timer.getTime()+1)
|
||||||
|
|
||||||
|
elseif false then
|
||||||
|
|
||||||
|
-- Create a tmp file.
|
||||||
|
local filenvbs = os.getenv('TMP') .. "\\MSRS-"..STTS.uuid()..".vbs"
|
||||||
|
|
||||||
|
-- VBS script
|
||||||
|
local script = io.open(filenvbs, "w+")
|
||||||
|
script:write(string.format('Set oShell = CreateObject ("Wscript.Shell")\n'))
|
||||||
|
script:write(string.format('Dim strArgs\n'))
|
||||||
|
script:write(string.format('strArgs = "cmd /c %s"\n', filename))
|
||||||
|
script:write(string.format('oShell.Run strArgs, 0, false'))
|
||||||
|
script:close()
|
||||||
|
|
||||||
|
local runvbs=string.format('cscript.exe //Nologo //B "%s"', filenvbs)
|
||||||
|
|
||||||
|
-- Play file in 0.01 seconds
|
||||||
|
res=os.execute(runvbs)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user