From d86913aaaf92dc86e4c56f6a4314349e9e484aea Mon Sep 17 00:00:00 2001 From: MaxED Date: Sun, 27 Aug 2017 14:20:43 -0600 Subject: [PATCH] light: fixed "_sun" light direction was calculated incorrectly when using a light without a target and mangle --- light/entities.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/light/entities.cc b/light/entities.cc index 9dc1e302..766ffbf8 100644 --- a/light/entities.cc +++ b/light/entities.cc @@ -502,6 +502,7 @@ SetupSuns(const globalconfig_t &cfg) } else { // Use { 0, 0, 0 } as sun target... logprint("WARNING: sun missing target, { 0 0 0 } used.\n"); VectorCopy(*entity.origin.vec3Value(), sunvec); + VectorInverse(sunvec); } // Add the sun