Skip to content
Snippets Groups Projects
Commit a8a66f69 authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

[Software] Use the light at the bottom of the object for splats

parent 4b7bfce9
Branches
Tags
1 merge request!1257New sprite features
......@@ -1914,12 +1914,13 @@ static void R_ProjectSprite(mobj_t *thing)
if (thing->subsector->sector->numlights)
{
INT32 lightnum;
fixed_t top = (splat) ? gz : gzt;
light = thing->subsector->sector->numlights - 1;
// R_GetPlaneLight won't work on sloped lights!
for (lightnum = 1; lightnum < thing->subsector->sector->numlights; lightnum++) {
fixed_t h = P_GetLightZAt(&thing->subsector->sector->lightlist[lightnum], thing->x, thing->y);
if (h <= gzt) {
if (h <= top) {
light = lightnum - 1;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment