From a8a66f698a47eb824c604c90835f85b470fb482a Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Tue, 13 Oct 2020 23:12:44 -0300 Subject: [PATCH] [Software] Use the light at the bottom of the object for splats --- src/r_things.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index 99fa2c7c5..a0b6239a7 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -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; }