Prevent negative alpha value
(affects splash screen)
This commit is contained in:
parent
1df5347a06
commit
d436484c21
1 changed files with 1 additions and 1 deletions
|
@ -1365,7 +1365,7 @@ FGRenderer::update( ) {
|
||||||
double sAlpha = _splash_alpha->getDoubleValue();
|
double sAlpha = _splash_alpha->getDoubleValue();
|
||||||
sAlpha -= SGMiscd::max(0.0,delay_time/fade_time);
|
sAlpha -= SGMiscd::max(0.0,delay_time/fade_time);
|
||||||
FGScenerySwitchCallback::scenery_enabled = (sAlpha<1.0);
|
FGScenerySwitchCallback::scenery_enabled = (sAlpha<1.0);
|
||||||
_splash_alpha->setDoubleValue(sAlpha);
|
_splash_alpha->setDoubleValue((sAlpha < 0) ? 0.0 : sAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
|
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue