From d15d2ad2703e0572e3b9a24d238d6089be1ec6b9 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Thu, 1 Nov 2012 15:31:05 +0100 Subject: [PATCH] Jean Pellotier: don't show markers for invalid targets in HUD Don't show invalid AI/MP models in the HUD (after they were removed from the scene). Also, when a radar is installed, consider radar/in-range for HUD display. --- src/Instrumentation/HUD/HUD_ladder.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Instrumentation/HUD/HUD_ladder.cxx b/src/Instrumentation/HUD/HUD_ladder.cxx index 5cf33fec4..d1000547e 100644 --- a/src/Instrumentation/HUD/HUD_ladder.cxx +++ b/src/Instrumentation/HUD/HUD_ladder.cxx @@ -274,9 +274,10 @@ void HUD::Ladder::draw(void) SGPropertyNode *chld = models->getChild(i); string name; name = chld->getName(); - if (name == "aircraft" || name == "multiplayer") { - string callsign = chld->getStringValue("callsign"); - if (callsign != "") { + if (name == "tanker" || name == "aircraft" || name == "multiplayer") { + bool valid = chld->getBoolValue("valid"); + bool in_range = chld->getBoolValue("radar/in-range", true); + if (valid && in_range) { float h_deg = chld->getFloatValue("radar/h-offset"); float v_deg = chld->getFloatValue("radar/v-offset"); float pos_x = (h_deg * cos(roll_value) - -- 2.39.5