From 0b36d5ecf3fbbca08e5a3428a223f5673c724fa5 Mon Sep 17 00:00:00 2001 From: Ciaran Fisher Date: Mon, 21 Mar 2022 19:48:55 +0100 Subject: [PATCH] Catch ejection --- Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua b/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua index 057ef5a66..a5efd38bd 100644 --- a/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua +++ b/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua @@ -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 = {