mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- Missed some castings.
This commit is contained in:
parent
8fecfb8f85
commit
15bcc4c6a1
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue