From: James Turner Date: Sat, 15 Nov 2014 16:29:30 +0000 (+0000) Subject: Tweak scenery-loaded logic X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=71da5b7a7665ee0224725b3691ac4997985b2c5f;p=flightgear.git Tweak scenery-loaded logic Make first-start (not a reset / re-init) behaviour more explicit. --- diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index 96a10fd19..2bd513a0a 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -168,11 +168,15 @@ void FGTileMgr::reinit() _options->setModelData(new FGNasalModelDataProxy); - // protect against multiple scenery reloads and properly reset flags, - // otherwise aircraft fall through the ground while reloading scenery - if (!fgGetBool("/sim/sceneryloaded",true)) - return; - fgSetBool("/sim/sceneryloaded",false); + if (state != Start) + { + // protect against multiple scenery reloads and properly reset flags, + // otherwise aircraft fall through the ground while reloading scenery + if (_scenery_loaded->getBoolValue() == false) + return; + } + + _scenery_loaded->setBoolValue(false); fgSetDouble("/sim/startup/splash-alpha", 1.0); materialLibChanged();