Skip to content
Snippets Groups Projects
Commit 0aba2f60 authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Fix FOFs with FF_CUTSOLIDS but not FF_SOLID causing software renderer problems and even crashes

Always wondered why a flag meant for FOF physics was used in the rendering code, lol
parent de630d0c
No related branches found
No related tags found
No related merge requests found
...@@ -1352,7 +1352,7 @@ static void R_RenderSegLoop (void) ...@@ -1352,7 +1352,7 @@ static void R_RenderSegLoop (void)
for (i = 0; i < dc_numlights; i++) for (i = 0; i < dc_numlights; i++)
{ {
dc_lightlist[i].height += dc_lightlist[i].heightstep; dc_lightlist[i].height += dc_lightlist[i].heightstep;
if (dc_lightlist[i].flags & FF_SOLID) if (dc_lightlist[i].flags & FF_CUTSOLIDS)
dc_lightlist[i].botheight += dc_lightlist[i].botheightstep; dc_lightlist[i].botheight += dc_lightlist[i].botheightstep;
} }
} }
...@@ -2001,7 +2001,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) ...@@ -2001,7 +2001,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
rlight->heightstep = -FixedMul (rw_scalestep, (light->height - viewz) >> 4); rlight->heightstep = -FixedMul (rw_scalestep, (light->height - viewz) >> 4);
rlight->flags = light->flags; rlight->flags = light->flags;
if (light->caster && light->caster->flags & FF_SOLID) if (light->caster && light->caster->flags & FF_CUTSOLIDS)
{ {
rlight->botheight = (centeryfrac >> 4) - FixedMul((*light->caster->bottomheight - viewz) >> 4, rw_scale); rlight->botheight = (centeryfrac >> 4) - FixedMul((*light->caster->bottomheight - viewz) >> 4, rw_scale);
rlight->botheightstep = -FixedMul (rw_scalestep, (*light->caster->bottomheight - viewz) >> 4); rlight->botheightstep = -FixedMul (rw_scalestep, (*light->caster->bottomheight - viewz) >> 4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment