From 15bcc4c6a1c1d783d1f5facfd4e8d47175bd066b Mon Sep 17 00:00:00 2001 From: drfrag Date: Fri, 26 Apr 2019 01:15:11 +0200 Subject: [PATCH] - Missed some castings. --- src/gl/dynlights/gl_dynlight1.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gl/dynlights/gl_dynlight1.cpp b/src/gl/dynlights/gl_dynlight1.cpp index bb2bff027..9de37553b 100644 --- a/src/gl/dynlights/gl_dynlight1.cpp +++ b/src/gl/dynlights/gl_dynlight1.cpp @@ -66,11 +66,11 @@ bool gl_GetLight(int group, Plane & p, FDynamicLight * light, bool checkside, FD DVector3 pos = light->PosRelative(group); float radius = (light->GetRadius()); - float dist = fabsf(p.DistToPoint(pos.X, pos.Z, pos.Y)); + auto dist = fabs(p.DistToPoint((float)pos.X, (float)pos.Z, (float)pos.Y)); if (radius <= 0.f) return false; if (dist > radius) return false; - if (checkside && gl_lights_checkside && p.PointOnSide(pos.X, pos.Z, pos.Y)) + if (checkside && gl_lights_checkside && p.PointOnSide((float)pos.X, (float)pos.Z, (float)pos.Y)) { return false; } @@ -143,9 +143,9 @@ void gl_AddLightToList(int group, FDynamicLight * light, FDynLightData &ldata) } float *data = &ldata.arrays[i][ldata.arrays[i].Reserve(16)]; - data[0] = pos.X; - data[1] = pos.Z; - data[2] = pos.Y; + data[0] = float(pos.X); + data[1] = float(pos.Z); + data[2] = float(pos.Y); data[3] = radius; data[4] = r; data[5] = g;