light: don't add 0 brightness suns

This commit is contained in:
Eric Wasylishen 2016-08-07 16:33:13 -06:00
parent 5e6f2220e8
commit 9004bed24e
1 changed files with 3 additions and 0 deletions

View File

@ -243,6 +243,9 @@ Dirt_ResolveFlag(int dirtInt)
static void static void
AddSun(vec3_t sunvec, vec_t light, const vec3_t color, int dirtInt) AddSun(vec3_t sunvec, vec_t light, const vec3_t color, int dirtInt)
{ {
if (light == 0.0f)
return;
sun_t sun {}; sun_t sun {};
VectorCopy(sunvec, sun.sunvec); VectorCopy(sunvec, sun.sunvec);
VectorNormalize(sun.sunvec); VectorNormalize(sun.sunvec);