1
0
Fork 0

Handle scenery-override in a single place only.

This commit is contained in:
ThorstenB 2012-09-17 13:37:36 +02:00
parent 7415696492
commit 06170ddaae
5 changed files with 10 additions and 11 deletions

View file

@ -89,11 +89,14 @@ static void fgLoadInitialScenery()
{
static SGPropertyNode_ptr scenery_loaded
= fgGetNode("sim/sceneryloaded", true);
static SGPropertyNode_ptr scenery_override
= fgGetNode("/sim/sceneryloaded-override", true);
if (!scenery_loaded->getBoolValue())
{
if (globals->get_tile_mgr()->isSceneryLoaded()
&& fgGetBool("sim/fdm-initialized")) {
if (scenery_override->getBoolValue() ||
(globals->get_tile_mgr()->isSceneryLoaded()
&& fgGetBool("sim/fdm-initialized"))) {
fgSetBool("sim/sceneryloaded",true);
fgSplashProgress("");
}

View file

@ -55,7 +55,6 @@ TimeManager::TimeManager() :
_inited(false),
_impl(NULL),
_sceneryLoaded("sim/sceneryloaded"),
_sceneryLoadOverride("sim/sceneryloaded-override"),
_modelHz("sim/model-hz"),
_timeDelta("sim/time/delta-realtime-sec"),
_simTimeDelta("sim/time/delta-sec")
@ -163,7 +162,7 @@ void TimeManager::computeTimeDeltas(double& simDt, double& realDt)
_lastClockFreeze = _clockFreeze->getBoolValue();
}
bool wait_for_scenery = !(_sceneryLoaded || _sceneryLoadOverride);
bool wait_for_scenery = !_sceneryLoaded;
if (!wait_for_scenery) {
throttleUpdateRate();
}

View file

@ -89,8 +89,7 @@ private:
double _frameLatencyMax;
int _frameCount;
SGPropObjBool _sceneryLoaded,
_sceneryLoadOverride;
SGPropObjBool _sceneryLoaded;
SGPropObjInt _modelHz;
SGPropObjDouble _timeDelta, _simTimeDelta;
};

View file

@ -514,7 +514,6 @@ FGRenderer::init( void )
if (!_classicalRenderer)
_pipeline = makeRenderingPipeline(_renderer, 0);
_scenery_loaded = fgGetNode("/sim/sceneryloaded", true);
_scenery_override = fgGetNode("/sim/sceneryloaded-override", true);
_panel_hotspots = fgGetNode("/sim/panel-hotspots", true);
_virtual_cockpit = fgGetNode("/sim/virtual-cockpit", true);
@ -1535,8 +1534,7 @@ FGRenderer::setupView( void )
// Update all Visuals (redraws anything graphics related)
void
FGRenderer::update( ) {
if (!(_scenery_loaded->getBoolValue() ||
_scenery_override->getBoolValue()))
if (!_scenery_loaded->getBoolValue())
{
_splash_alpha->setDoubleValue(1.0);
return;

View file

@ -121,7 +121,7 @@ public:
protected:
osg::ref_ptr<osgViewer::Viewer> viewer;
osg::ref_ptr<flightgear::FGEventHandler> eventHandler;
SGPropertyNode_ptr _scenery_loaded,_scenery_override;
SGPropertyNode_ptr _scenery_loaded;
SGPropertyNode_ptr _skyblend, _splash_alpha;
SGPropertyNode_ptr _point_sprites, _enhanced_lighting, _distance_attenuation;
SGPropertyNode_ptr _textures;