From 00ea95ee2b98e58f43010750e63ca24a8c2a0d5d Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 31 Jul 2024 07:37:17 +0200 Subject: [PATCH] stuff --- src/p_spec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 64d9a5914..b8250e4bb 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1773,15 +1773,17 @@ void P_SwitchWeather(INT32 weathernum) if (purge) { thinker_t *think; + thinker_t *next; precipmobj_t *precipmobj; - for (think = thinkercap.next; think != &thinkercap; think = think->next) + for (think = thinkercap.next; think != &thinkercap; think = next) { + next = think->next; + if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker) continue; // not a precipmobj thinker precipmobj = (precipmobj_t *)think; - P_FreePrecipMobj(precipmobj); } } @@ -1795,6 +1797,7 @@ void P_SwitchWeather(INT32 weathernum) { if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker) continue; // not a precipmobj thinker + precipmobj = (precipmobj_t *)think; if (swap == PRECIP_RAIN) // Snow To Rain