From 4a067e721feddfb3c8133488d661b01640786cb8 Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Fri, 7 Jun 2019 21:27:53 +0100 Subject: [PATCH] src/MultiPlayer/multiplaymgr.cxx: don't overwrite /sim/multiplay/visibility-range-nm if already set. This allows it to be set e.g. in ~/.fgfsrc with --prop. --- src/MultiPlayer/multiplaymgr.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index dcf8fe280..041b2133d 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -961,7 +961,10 @@ FGMultiplayMgr::FGMultiplayMgr() pMultiPlayDebugLevel = fgGetNode("/sim/multiplay/debug-level", true); pMultiPlayTransmitPropertyBase = fgGetNode("/sim/multiplay/transmit-filter-property-base", true); pMultiPlayRange = fgGetNode("/sim/multiplay/visibility-range-nm", true); - pMultiPlayRange->setIntValue(100); + if (pMultiPlayRange->getIntValue() == 0) { + /* Only set if currently zero - this allows override e.g. in ~/.fgfsrc. */ + pMultiPlayRange->setIntValue(100); + } } // FGMultiplayMgr::FGMultiplayMgr() //////////////////////////////////////////////////////////////////////