mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Feat: added backend ability to set spawn heading
This commit is contained in:
@@ -181,6 +181,16 @@ function Olympus.buildTask(groupName, options)
|
||||
}
|
||||
}
|
||||
|
||||
if options['pattern'] == 'Race-Track' then
|
||||
local heading = options['heading'] or 0
|
||||
local length = options['length'] or 20000
|
||||
if group ~= nil then
|
||||
local groupPos = mist.getLeadPos(group)
|
||||
task['params']['point'] = {x = groupPos.x, y = groupPos.z}
|
||||
task['params']['point2'] = {x = groupPos.x + math.cos(heading) * length, y = groupPos.z + math.sin(heading) * length}
|
||||
end
|
||||
end
|
||||
|
||||
-- Compute the altitude depending on the altitude type
|
||||
if options['altitude'] then
|
||||
if options ['altitudeType'] then
|
||||
|
||||
Reference in New Issue
Block a user