From 7b858501c43a8c6cd60c76ab0c80e74dcc9a1a53 Mon Sep 17 00:00:00 2001 From: yellowtd <ren_amon@hotmail.com> Date: Tue, 18 Nov 2014 02:18:51 -0500 Subject: [PATCH] Update hw_light.c Fixes rendering lights with cv_drawdist by adding *FRACUNIT --- src/hardware/hw_light.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index ffabcc0205..2148751ac9 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -1258,7 +1258,7 @@ static void HWR_ComputeLightMapsInBSPNode(int bspnum, fixed_t *bbox) // -------------------------------------------------------------------------- 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 || (thing->player && thing->player->powers[pw_super]))) if ((t_lspr[thing->sprite]->type&DYNLIGHT_SPR) -- GitLab