From fe3a7525b3a88104b7262406ceaa7467c6da0164 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 18 Jan 2025 21:04:20 +0100 Subject: [PATCH] mobjscale precip sectorheight stuff --- src/p_mobj.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index c9dc64eec..b9696c0a9 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10316,7 +10316,7 @@ consvar_t cv_suddendeath = {"suddendeath", "Off", CV_NETVAR|CV_CHEAT|CV_NOSHOWHE void P_SpawnPrecipitation(void) { INT32 i, j, mrand; - fixed_t basex, basey, j, x, y, z; + fixed_t basex, basey, x, y, z, height; subsector_t *precipsector = NULL; precipmobj_t *rainmo = NULL; @@ -10358,8 +10358,11 @@ void P_SpawnPrecipitation(void) if (precipsector->sector->ceilingpic != skyflatnum) continue; + height = precipsector->sector->ceilingheight - precipsector->sector->floorheight; + height = FixedDiv(height, precipmoscale); + // Exists, but is too small for reasonable precipitation. - if (!(precipsector->sector->floorheight <= precipsector->sector->ceilingheight - (32<