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
This commit is contained in:
Roland Winklmeier
2017-01-28 00:45:46 +01:00
committed by Mathew Sutcliffe
parent 1401b2f956
commit a7635a7e13

View File

@@ -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 <stdbool.h>
#include <QTimer>
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;