Skip to content
Snippets Groups Projects
Commit 7b858501 authored by Luna's avatar Luna
Browse files

Update hw_light.c

Fixes rendering lights with cv_drawdist by adding *FRACUNIT
parent 7af57684
No related branches found
No related tags found
No related merge requests found
...@@ -1258,7 +1258,7 @@ static void HWR_ComputeLightMapsInBSPNode(int bspnum, fixed_t *bbox) ...@@ -1258,7 +1258,7 @@ static void HWR_ComputeLightMapsInBSPNode(int bspnum, fixed_t *bbox)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static void HWR_AddMobjLights(mobj_t *thing) static void HWR_AddMobjLights(mobj_t *thing)
{ {
if (!cv_drawdist.value || P_AproxDistance(thing->x-viewx, thing->y-viewy) < cv_drawdist.value) if (!cv_drawdist.value || P_AproxDistance(thing->x-viewx, thing->y-viewy) < cv_drawdist.value*FRACUNIT)
if (!(thing->flags2 & MF2_DEBRIS) && (thing->sprite != SPR_PLAY || if (!(thing->flags2 & MF2_DEBRIS) && (thing->sprite != SPR_PLAY ||
(thing->player && thing->player->powers[pw_super]))) (thing->player && thing->player->powers[pw_super])))
if ((t_lspr[thing->sprite]->type&DYNLIGHT_SPR) if ((t_lspr[thing->sprite]->type&DYNLIGHT_SPR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment