From 71da5b7a7665ee0224725b3691ac4997985b2c5f Mon Sep 17 00:00:00 2001 From: James Turner <zakalawe@mac.com> Date: Sat, 15 Nov 2014 16:29:30 +0000 Subject: [PATCH] Tweak scenery-loaded logic Make first-start (not a reset / re-init) behaviour more explicit. --- src/Scenery/tilemgr.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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();