1
0
Fork 0

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.
This commit is contained in:
Julian Smith 2019-06-07 21:27:53 +01:00
parent 5772325bc6
commit 4a067e721f

View file

@ -961,7 +961,10 @@ FGMultiplayMgr::FGMultiplayMgr()
pMultiPlayDebugLevel = fgGetNode("/sim/multiplay/debug-level", true); pMultiPlayDebugLevel = fgGetNode("/sim/multiplay/debug-level", true);
pMultiPlayTransmitPropertyBase = fgGetNode("/sim/multiplay/transmit-filter-property-base", true); pMultiPlayTransmitPropertyBase = fgGetNode("/sim/multiplay/transmit-filter-property-base", true);
pMultiPlayRange = fgGetNode("/sim/multiplay/visibility-range-nm", 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() } // FGMultiplayMgr::FGMultiplayMgr()
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////