light: fixed "_sun" light direction was calculated incorrectly when using a light without a target and mangle

This commit is contained in:
MaxED 2017-08-27 14:20:43 -06:00 committed by Eric Wasylishen
parent 15871d2531
commit d86913aaaf
1 changed files with 1 additions and 0 deletions

View File

@ -502,6 +502,7 @@ SetupSuns(const globalconfig_t &cfg)
} else { // Use { 0, 0, 0 } as sun target... } else { // Use { 0, 0, 0 } as sun target...
logprint("WARNING: sun missing target, { 0 0 0 } used.\n"); logprint("WARNING: sun missing target, { 0 0 0 } used.\n");
VectorCopy(*entity.origin.vec3Value(), sunvec); VectorCopy(*entity.origin.vec3Value(), sunvec);
VectorInverse(sunvec);
} }
// Add the sun // Add the sun