From 6646aa564487111a9f1101703fabfbc6a4637b8b Mon Sep 17 00:00:00 2001 From: timoore Date: Sat, 22 Dec 2007 23:01:36 +0000 Subject: [PATCH] Fix tiny bugs in sun constructor and repaint code --- simgear/scene/sky/oursun.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/simgear/scene/sky/oursun.cxx b/simgear/scene/sky/oursun.cxx index 8a2cd6bd..fb114627 100644 --- a/simgear/scene/sky/oursun.cxx +++ b/simgear/scene/sky/oursun.cxx @@ -49,9 +49,11 @@ using namespace simgear; // Constructor -SGSun::SGSun( void ) { - prev_sun_angle = -9999.0; - visibility = -9999.0; +SGSun::SGSun( void ) : + visibility(-9999.0), prev_sun_angle(-9999.0), path_distance(60000.0), + sun_exp2_punch_through(7.0e-06) +{ + } @@ -336,7 +338,7 @@ bool SGSun::repaint( double sun_angle, double new_visibility ) { else if ( i_halo_color[2] > 1) i_halo_color[2] = 1; if ( o_halo_color[2] < 0 ) o_halo_color[2] = 0; else if ( o_halo_color[2] > 1) o_halo_color[2] = 1; - if ( o_halo_color[3] < 0 ) o_halo_color[2] = 0; + if ( o_halo_color[3] < 0 ) o_halo_color[3] = 0; else if ( o_halo_color[3] > 1) o_halo_color[3] = 1; -- 2.39.5