From 69fab3fc9675eaed4c47647193ef02549ae0c1b8 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 23 Oct 2015 18:31:39 -0600 Subject: [PATCH] light: clean up SetupSkyDome --- light/entities.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/light/entities.c b/light/entities.c index 50c9f040..ce5f7cf4 100644 --- a/light/entities.c +++ b/light/entities.c @@ -413,7 +413,6 @@ SetupSkyDome() int angleSteps, elevationSteps; float angle, elevation; float angleStep, elevationStep; - float step, start; vec3_t direction; const int iterations = 8; @@ -422,15 +421,11 @@ SetupSkyDome() return; } - /* calculate some stuff */ - step = 2.0f / ( iterations - 1 ); - start = -1.0f; - /* setup */ elevationSteps = iterations - 1; angleSteps = elevationSteps * 4; angle = 0.0f; - elevationStep = DEG2RAD( 90.0f / iterations ); /* skip elevation 0 */ + elevationStep = DEG2RAD( 90.0f / (elevationSteps + 1) ); /* skip elevation 0 */ angleStep = DEG2RAD( 360.0f / angleSteps ); /* calc individual sun brightness */