Skip to content

Commit

Permalink
Catch ejection
Browse files Browse the repository at this point in the history
  • Loading branch information
ciribob committed Mar 21, 2022
1 parent 9a485f0 commit 0b36d5e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ function SR.exporter()
local _update
local _data = LoGetSelfData()

if _data ~= nil then
-- check for death / eject -- call below returns a number when so
local _device = GetDevice(0)

if type(_device) == 'number' then
_data = nil -- wipe out data - aircraft is gone really
end
end

if _data ~= nil then

_update = {
Expand Down

0 comments on commit 0b36d5e

Please sign in to comment.