Feat: added backend ability to set spawn heading

This commit is contained in:
Davide Passoni
2025-01-24 15:01:25 +01:00
parent d1d4116e66
commit 96415fd087
8 changed files with 40 additions and 5 deletions

View File

@@ -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