From da2ee04eeadf74f686e3f60d7ead5b550738a80f Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sat, 7 Apr 2012 16:35:04 +0200 Subject: [PATCH] Fix scenery reload issues. Aircraft could fall through the ground on scenery reload. --- src/Scenery/tilemgr.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index 876826d5f..0f566485b 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -101,8 +101,10 @@ void FGTileMgr::refresh_tile(void* tileMgr, long tileIndex) void FGTileMgr::reinit() { - // reset flag, stop FDM processing, otherwise aircraft fall through - // the ground while reloading scenery + // 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); fgSetDouble("/sim/startup/splash-alpha", 1.0);