From 172d99312a989034d259a7eb412245587d30e48e Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 29 Sep 2025 14:13:15 +0200 Subject: [PATCH] fix precip not propely accounting for moving fofs (again) idk if i want this outside of lugstuff since this may make precip run worse again --- src/p_mobj.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index beb9070a4..0bef77c09 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3593,7 +3593,7 @@ animonly: } } -static void P_CalculatePrecipFloor(precipmobj_t *mobj, boolean spawn) +static void P_CalculatePrecipFloor(precipmobj_t *mobj) { // recalculate floorz each time const sector_t *sec; @@ -3603,10 +3603,6 @@ static void P_CalculatePrecipFloor(precipmobj_t *mobj, boolean spawn) else return; - // no need to recalc anything if not moved - if (!spawn && !sec->moved) - return; - mobj->floorz = P_GetSectorFloorZAt(sec, mobj->x, mobj->y); if (sec->ffloors) @@ -3699,7 +3695,7 @@ boolean P_PrecipThinker(precipmobj_t *mobj) // only recalc this twice a second (doubt anyone will notice this lulul) if ((leveltime % 17) == 0) - P_CalculatePrecipFloor(mobj, false); + P_CalculatePrecipFloor(mobj); // adjust height if ((mobj->z += mobj->momz) <= mobj->floorz) @@ -10126,7 +10122,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype mobj->thinker.function = (actionf_p1)P_NullPrecipThinker; P_AddPrecipThinker(&mobj->thinker); - P_CalculatePrecipFloor(mobj, true); + P_CalculatePrecipFloor(mobj); if (mobj->floorz != starting_floorz) mobj->precipflags |= PCF_FOF;