mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
[Software] Use the light at the bottom of the object for splats
This commit is contained in:
parent
4b7bfce95e
commit
a8a66f698a
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue