From d436484c2119a6f0a5734af8b1797125d1cff776 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Mon, 26 Mar 2012 21:09:10 +0200 Subject: [PATCH] Prevent negative alpha value (affects splash screen) --- src/Main/renderer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 5083f89da..3f71d1f74 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -1365,7 +1365,7 @@ FGRenderer::update( ) { double sAlpha = _splash_alpha->getDoubleValue(); sAlpha -= SGMiscd::max(0.0,delay_time/fade_time); FGScenerySwitchCallback::scenery_enabled = (sAlpha<1.0); - _splash_alpha->setDoubleValue(sAlpha); + _splash_alpha->setDoubleValue((sAlpha < 0) ? 0.0 : sAlpha); } FGLight *l = static_cast(globals->get_subsystem("lighting"));