From e342d879e84003ee620d3da337f771954cd6bb9a Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Sun, 12 Jul 2009 01:02:58 +0200 Subject: [PATCH] Radar patch from Vivian --- src/AIModel/AIBase.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index 973d4b69e..a63751a1c 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -318,9 +318,16 @@ void FGAIBase::unbind() { props->untie("radar/ht-diff-ft"); props->untie("controls/lighting/nav-lights"); + + props->setBoolValue("/sim/controls/radar/", true); + } double FGAIBase::UpdateRadar(FGAIManager* manager) { + bool control = fgGetBool("/sim/controls/radar", true); + + if(!control) return 0; + double radar_range_ft2 = fgGetDouble("/instrumentation/radar/range"); bool force_on = fgGetBool("/instrumentation/radar/debug-mode", false); radar_range_ft2 *= SG_NM_TO_METER * SG_METER_TO_FEET * 1.1; // + 10%