Skip to content

Commit b929548

Browse files
authored
Merge pull request #5135 from Goober5000/fix_5089
fix sunglares when lightshafts are disabled
2 parents 3047a22 + c72e214 commit b929548

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

freespace2/freespace.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ void game_sunspot_process(float frametime)
710710
for(idx=0; idx<n_lights; idx++) {
711711
bool in_shadow = shipfx_eye_in_shadow(&Eye_position, Viewer_obj, idx);
712712

713-
if (gr_lightshafts_enabled() && !in_shadow) {
713+
if (!in_shadow) {
714714
vec3d light_dir;
715715
light_get_global_dir(&light_dir, idx);
716716

@@ -719,8 +719,7 @@ void game_sunspot_process(float frametime)
719719
float dot = vm_vec_dot( &light_dir, &Eye_matrix.vec.fvec )*0.5f+0.5f;
720720
Sun_spot_goal += (float)pow(dot,85.0f);
721721
}
722-
}
723-
if ( !in_shadow ) {
722+
724723
// draw the glow for this sun
725724
stars_draw_sun_glow(idx);
726725
}

0 commit comments

Comments
 (0)