mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-28 13:00:57 +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)
|
if (thing->subsector->sector->numlights)
|
||||||
{
|
{
|
||||||
INT32 lightnum;
|
INT32 lightnum;
|
||||||
|
fixed_t top = (splat) ? gz : gzt;
|
||||||
light = thing->subsector->sector->numlights - 1;
|
light = thing->subsector->sector->numlights - 1;
|
||||||
|
|
||||||
// R_GetPlaneLight won't work on sloped lights!
|
// R_GetPlaneLight won't work on sloped lights!
|
||||||
for (lightnum = 1; lightnum < thing->subsector->sector->numlights; lightnum++) {
|
for (lightnum = 1; lightnum < thing->subsector->sector->numlights; lightnum++) {
|
||||||
fixed_t h = P_GetLightZAt(&thing->subsector->sector->lightlist[lightnum], thing->x, thing->y);
|
fixed_t h = P_GetLightZAt(&thing->subsector->sector->lightlist[lightnum], thing->x, thing->y);
|
||||||
if (h <= gzt) {
|
if (h <= top) {
|
||||||
light = lightnum - 1;
|
light = lightnum - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue