From f3982861621247d2d0a7c8a725fd499fdb012ac5 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 4 Jan 2018 19:09:12 +0100 Subject: [PATCH] - Fix wrong spot direction --- src/gl/dynlights/gl_dynlight1.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl/dynlights/gl_dynlight1.cpp b/src/gl/dynlights/gl_dynlight1.cpp index a9efdd880..c41290740 100644 --- a/src/gl/dynlights/gl_dynlight1.cpp +++ b/src/gl/dynlights/gl_dynlight1.cpp @@ -142,9 +142,9 @@ void gl_AddLightToList(int group, ADynamicLight * light, FDynLightData &ldata) DAngle negPitch = -light->Angles.Pitch; float xyLen = negPitch.Cos(); - spotDirX = light->Angles.Yaw.Cos() * xyLen; - spotDirY = light->Angles.Yaw.Sin() * xyLen; - spotDirZ = negPitch.Sin(); + spotDirX = -light->Angles.Yaw.Cos() * xyLen; + spotDirY = -light->Angles.Yaw.Sin() * xyLen; + spotDirZ = -negPitch.Sin(); } float *data = &ldata.arrays[i][ldata.arrays[i].Reserve(16)];