Repaint the sky when the view heading changes also
This commit is contained in:
parent
b520fd18ac
commit
5a66847064
1 changed files with 3 additions and 0 deletions
|
@ -598,9 +598,11 @@ void fgRenderFrame() {
|
|||
static double cur_lat = 9999.0;
|
||||
static double cur_long = 9999.0;
|
||||
static double cur_alt = -9999.0;
|
||||
static float view_heading = 9999.0;
|
||||
|
||||
if ((fabs(sun_pos_rotation - cur_light_params.sun_rotation) > 5e-3)
|
||||
|| (fabs(sun_pos_angle - cur_light_params.sun_angle) > 5e-3)
|
||||
|| (fabs(view_heading - current__view->getHeading_deg()) > 5e-3)
|
||||
|| (init != 0))
|
||||
{
|
||||
if (init > 0)
|
||||
|
@ -608,6 +610,7 @@ void fgRenderFrame() {
|
|||
|
||||
sun_pos_angle = cur_light_params.sun_angle;
|
||||
sun_pos_rotation = cur_light_params.sun_rotation;
|
||||
view_heading = current__view->getHeading_deg ();
|
||||
|
||||
thesky->repaint( cur_light_params.sky_color,
|
||||
cur_light_params.adj_fog_color,
|
||||
|
|
Loading…
Reference in a new issue