From 4ec75966d825402c270e71afe851a6b8866e623f Mon Sep 17 00:00:00 2001 From: Justin Nicholson Date: Tue, 6 Nov 2018 20:46:12 +0000 Subject: [PATCH] port over gci bugfixes --- gci-radar/Nasal/gci.nas | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gci-radar/Nasal/gci.nas b/gci-radar/Nasal/gci.nas index 46ef60d..33f047d 100644 --- a/gci-radar/Nasal/gci.nas +++ b/gci-radar/Nasal/gci.nas @@ -86,7 +86,7 @@ var gci_contact = { return m; }, getValid: func() { - if (me.valid.getNode() == 0 and me.callsign != me.node.getNode("callsign").getValue()) { + if (me.valid.getValue() == 0 or me.callsign != me.node.getNode("callsign").getValue()) { return 0; } else { return 1; @@ -224,6 +224,7 @@ var gather_contacts = func() { for (var i = 0; i < size(cx_master_list); i = i + 1) { if (cx_master_list[i] == nil) { break; } if (!cx_master_list[i].getValid()) { + print("purging contact: " ~ cx_master_list[i].contact.get_Callsign()); cx_master_list = purge_from_vector(cx_master_list, i); } } @@ -232,7 +233,7 @@ var gather_contacts = func() { if (mp.getNode("valid").getValue() == 1) { matching = false; foreach(var cx; cx_master_list) { - if ( mp.getPath() == cx.contact.getNode().getPath() ) { + if ( mp.getPath() == cx.contact.getNode().getPath() and mp.getNode("callsign").getValue() == cx.callsign) { matching = true; break; } @@ -495,4 +496,10 @@ var remove_suffix = func(s, x) { return s; } +# visibility function +settimer( func{ + setprop("/sim/multiplay/visibility-range-nm",1200); + print("set mp visibility to " ~ 1200); +}, 15); + main_loop();