]> git.mxchange.org Git - simgear.git/commitdiff
Fix tiny bugs in sun constructor and repaint code
authortimoore <timoore>
Sat, 22 Dec 2007 23:01:36 +0000 (23:01 +0000)
committertimoore <timoore>
Sat, 22 Dec 2007 23:01:36 +0000 (23:01 +0000)
simgear/scene/sky/oursun.cxx

index 8a2cd6bd135bad11e166696cf881c9eb77104542..fb114627bc8899ade003392a3384e2fba03ed72b 100644 (file)
 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;