From: ThorstenB Date: Fri, 9 Dec 2011 16:19:45 +0000 (+0100) Subject: Avoid useless warnings during FG startup. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=444720f62d484cf9886cdbdf5735b5b1ee1d9137;p=flightgear.git Avoid useless warnings during FG startup. Do not warn about missing scenery manager, unless it is really needed. Also raise warn level for multiple init calls. --- diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index c6a967f8d..7871f7e8e 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -164,6 +164,9 @@ FGAIBase::~FGAIBase() { void FGAIBase::removeModel() { + if (!_model.valid()) + return; + FGScenery* pSceneryManager = globals->get_scenery(); if (pSceneryManager) { @@ -292,7 +295,7 @@ bool FGAIBase::init(bool search_in_AI_path) { if (_model.valid()) { - SG_LOG(SG_AI, SG_WARN, "AIBase: Cannot initialize a model multiple times! " << model_path); + SG_LOG(SG_AI, SG_ALERT, "AIBase: Cannot initialize a model multiple times! " << model_path); return false; }