diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 4a075d376..622641b4f 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5454,7 +5454,7 @@ static void HWR_AddSprites(sector_t *sec) #ifdef HWPRECIP precipmobj_t *precipthing; #endif - fixed_t approx_dist, limit_dist; + fixed_t approx_dist, limit_dist, hoop_limit_dist; // BSP is traversed by subsector. // A sector might have been split into several @@ -5471,7 +5471,9 @@ static void HWR_AddSprites(sector_t *sec) // Handle all things in sector. // If a limit exists, handle things a tiny bit different. - if ((limit_dist = (fixed_t)((maptol & TOL_NIGHTS) ? cv_drawdist_nights.value : cv_drawdist.value) << FRACBITS)) + limit_dist = (fixed_t)(cv_drawdist.value) << FRACBITS; + hoop_limit_dist = (fixed_t)(cv_drawdist_nights.value) << FRACBITS; + if (limit_dist || hoop_limit_dist) { for (thing = sec->thinglist; thing; thing = thing->snext) { @@ -5480,8 +5482,16 @@ static void HWR_AddSprites(sector_t *sec) approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y); - if (approx_dist > limit_dist) - continue; + if (thing->sprite == SPR_HOOP) + { + if (hoop_limit_dist && approx_dist > hoop_limit_dist) + continue; + } + else + { + if (limit_dist && approx_dist > limit_dist) + continue; + } HWR_ProjectSprite(thing); } diff --git a/src/m_menu.c b/src/m_menu.c index 1ab361b80..52dce87e0 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1224,7 +1224,7 @@ static menuitem_t OP_VideoOptionsMenu[] = {IT_HEADER, NULL, "Level", NULL, 155}, {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 161}, {IT_STRING | IT_CVAR, NULL, "Weather Draw Dist.", &cv_drawdist_precip, 166}, - {IT_STRING | IT_CVAR, NULL, "NiGHTS mode Draw Dist.", &cv_drawdist_nights, 171}, + {IT_STRING | IT_CVAR, NULL, "NiGHTS Hoop Draw Dist.", &cv_drawdist_nights, 171}, {IT_HEADER, NULL, "Diagnostic", NULL, 180}, {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 186}, diff --git a/src/r_things.c b/src/r_things.c index 43e006a30..2ecd116ea 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1637,7 +1637,7 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel) mobj_t *thing; precipmobj_t *precipthing; // Tails 08-25-2002 INT32 lightnum; - fixed_t approx_dist, limit_dist; + fixed_t approx_dist, limit_dist, hoop_limit_dist; if (rendermode != render_soft) return; @@ -1668,7 +1668,9 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel) // Handle all things in sector. // If a limit exists, handle things a tiny bit different. - if ((limit_dist = (fixed_t)((maptol & TOL_NIGHTS) ? cv_drawdist_nights.value : cv_drawdist.value) << FRACBITS)) + limit_dist = (fixed_t)(cv_drawdist.value) << FRACBITS; + hoop_limit_dist = (fixed_t)(cv_drawdist_nights.value) << FRACBITS; + if (limit_dist || hoop_limit_dist) { for (thing = sec->thinglist; thing; thing = thing->snext) { @@ -1677,8 +1679,16 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel) approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y); - if (approx_dist > limit_dist) - continue; + if (thing->sprite == SPR_HOOP) + { + if (hoop_limit_dist && approx_dist > hoop_limit_dist) + continue; + } + else + { + if (limit_dist && approx_dist > limit_dist) + continue; + } R_ProjectSprite(thing); }