From a7635a7e13cd3cb84b96df8e3064e14e334ce5da Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Sat, 28 Jan 2017 00:45:46 +0100 Subject: [PATCH] Force observer mode login only in shipped versions The required feature to force observer login in case no simulator is available, is only necessary in offically shipped versions. In order to allow developer testing, limit it to shipped builds only. refs #872 --- src/blackcore/context/contextnetworkimpl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blackcore/context/contextnetworkimpl.cpp b/src/blackcore/context/contextnetworkimpl.cpp index 095856d99..f65a674ac 100644 --- a/src/blackcore/context/contextnetworkimpl.cpp +++ b/src/blackcore/context/contextnetworkimpl.cpp @@ -7,6 +7,7 @@ * contained in the LICENSE file. */ +#include "blackconfig/buildconfig.h" #include "blackcore/airspaceanalyzer.h" #include "blackcore/airspacemonitor.h" #include "blackcore/application.h" @@ -40,6 +41,7 @@ #include #include +using namespace BlackConfig; using namespace BlackMisc; using namespace BlackMisc::PhysicalQuantities; using namespace BlackMisc::Aviation; @@ -181,7 +183,7 @@ namespace BlackCore this->m_network->presetServer(server); // Fall back to observer mode, if no simulator is available or not simulating - if(!this->getIContextSimulator()->isSimulatorSimulating()) + if(CBuildConfig::isShippedVersion() && !this->getIContextSimulator()->isSimulatorSimulating()) { CLogMessage(this).info("No simulator connected or connected simulator not simulating. Falling back to observer mode"); mode = INetwork::LoginAsObserver;