diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 44f178591..704dd2899 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4435,7 +4435,7 @@ static void HWR_AddPrecipitationSprites(void) fixed_t drawdist; - // save a little time on invisible weather + // save a little time if theres no or invisible weather if (curWeather == PRECIP_NONE || curWeather == PRECIP_BLANK || curWeather == PRECIP_STORM_NORAIN) { return; diff --git a/src/r_things.c b/src/r_things.c index c08dc014b..e6387db61 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2052,14 +2052,20 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel) // void R_AddPrecipitationSprites(void) { - 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; + // save a little time if theres no or invisible weather + if (curWeather == PRECIP_NONE || curWeather == PRECIP_BLANK || curWeather == PRECIP_STORM_NORAIN) + { + return; + } + + const fixed_t precipscale = (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT); + const fixed_t drawdist = ((fixed_t)(cv_drawdist_precip.value) * precipscale); + // no, no infinite draw distance for precipitation. this option at zero is supposed to turn it off - if (drawdist == 0 || curWeather == PRECIP_NONE || curWeather == PRECIP_BLANK || curWeather == PRECIP_STORM_NORAIN) + if (drawdist == 0) { return; }