1
0
Fork 0

A small fix to have a smoot transition of cloud colors when in time warp mode

This commit is contained in:
ehofman 2003-09-20 11:05:12 +00:00
parent a33ad90ed7
commit e0dda6ad52
2 changed files with 7 additions and 2 deletions

View file

@ -1103,6 +1103,11 @@ static void fgMainLoop( void ) {
cur_time_override->getLongValue(),
globals->get_warp() );
if (globals->get_warp_delta() != 0) {
FGLight *l = (FGLight *)(globals->get_subsystem("lighting"));
l->update( 0.5 );
}
// update magvar model
globals->get_mag()->update( longitude->getDoubleValue()
* SGD_DEGREES_TO_RADIANS,

View file

@ -129,15 +129,15 @@ void FGLight::update( double dt ) {
update_adj_fog_color();
_dt_total += dt;
if (_dt_total > 0.5) {
if (_dt_total >= 0.5) {
_dt_total -= 0.5;
fgUpdateSunPos();
fgUpdateMoonPos();
}
if (_prev_sun_angle != _sun_angle) {
_prev_sun_angle = _sun_angle;
update_sky_color();
_prev_sun_angle = _sun_angle;
}
}