]> git.mxchange.org Git - flightgear.git/commitdiff
Fix scenery reload issues.
authorThorstenB <brehmt@gmail.com>
Sat, 7 Apr 2012 14:35:04 +0000 (16:35 +0200)
committerThorstenB <brehmt@gmail.com>
Sat, 7 Apr 2012 14:35:04 +0000 (16:35 +0200)
Aircraft could fall through the ground on scenery reload.

src/Scenery/tilemgr.cxx

index 876826d5fe44c767e842a65f345f81fdc550dfb6..0f566485b4c11f3a4453792783c615e18dacafb6 100644 (file)
@@ -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);