- Fix wrong spot direction

This commit is contained in:
Magnus Norddahl 2018-01-04 19:09:12 +01:00
parent 5f36b86013
commit f398286162

View file

@ -142,9 +142,9 @@ void gl_AddLightToList(int group, ADynamicLight * light, FDynLightData &ldata)
DAngle negPitch = -light->Angles.Pitch; DAngle negPitch = -light->Angles.Pitch;
float xyLen = negPitch.Cos(); float xyLen = negPitch.Cos();
spotDirX = light->Angles.Yaw.Cos() * xyLen; spotDirX = -light->Angles.Yaw.Cos() * xyLen;
spotDirY = light->Angles.Yaw.Sin() * xyLen; spotDirY = -light->Angles.Yaw.Sin() * xyLen;
spotDirZ = negPitch.Sin(); spotDirZ = -negPitch.Sin();
} }
float *data = &ldata.arrays[i][ldata.arrays[i].Reserve(16)]; float *data = &ldata.arrays[i][ldata.arrays[i].Reserve(16)];