From c4926221025f11d535ba74fa5bc013a94014d8b4 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 22 Dec 2024 01:47:00 +0100 Subject: [PATCH] add some () --- src/hardware/hw_main.c | 6 +++--- src/r_things.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 8a3f66a15..bcec1685f 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4402,9 +4402,9 @@ static void HWR_AddSprites(sector_t *sec) // -------------------------------------------------------------------------- static void HWR_AddPrecipitationSprites(void) { - //const fixed_t drawdist = cv_drawdist_precip.value * mapobjectscale; fixed_t drawdist; - fixed_t precipscale = cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT; + fixed_t precipscale = (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT); + //const fixed_t drawdist = cv_drawdist_precip.value * mapobjectscale; INT32 xl, xh, yl, yh, bx, by; precipmobj_t *th; @@ -4412,7 +4412,7 @@ static void HWR_AddPrecipitationSprites(void) if (current_bsp_culling_distance) drawdist = min((fixed_t)current_bsp_culling_distance, (fixed_t)(cv_drawdist_precip.value) * precipscale); else - drawdist = (fixed_t)(cv_drawdist_precip.value) * precipscale; + drawdist = ((fixed_t)(cv_drawdist_precip.value) * precipscale); // No to infinite precipitation draw distance. if (drawdist == 0 || curWeather == PRECIP_BLANK || curWeather == PRECIP_STORM_NORAIN) diff --git a/src/r_things.c b/src/r_things.c index b48b0e376..8447ac502 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2022,6 +2022,7 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel) // Handle all things in sector. // If a limit exists, handle things a tiny bit different. const fixed_t limit_dist = (fixed_t)(cv_drawdist.value) * mapobjectscale; + for (thing = sec->thinglist; thing; thing = thing->snext) { if (!R_ThingWithinDist(thing, limit_dist)) @@ -2041,7 +2042,8 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel) // void R_AddPrecipitationSprites(void) { - fixed_t drawdist = (fixed_t)(cv_drawdist_precip.value) * (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT); + fixed_t precipscale = (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT); + fixed_t drawdist = ((fixed_t)(cv_drawdist_precip.value) * precipscale); INT32 xl, xh, yl, yh, bx, by; precipmobj_t *th, *next;