mobjscale precip sectorheight stuff

This commit is contained in:
Alug committed 2025-01-18 21:04:20 +01:00
1 parent 5380ce85d9
commit fe3a7525b3
1 file changed
+5 -2
+5 -2
View File
@@ -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<<FRACBITS)))
if (height < 64<<FRACBITS)
continue;
// Don't set z properly yet...