Proper sector condition for water particles

This commit is contained in:
Sally Coolatta 2022-06-05 07:00:34 -04:00
parent 0e96aeec84
commit 353ac60407

View file

@ -10677,7 +10677,31 @@ void P_SpawnPrecipitation(void)
continue;
// Not in a sector with visible sky?
condition = (precipsector->sector->ceilingpic == skyflatnum);
if (precipprops[curWeather].effects & PRECIPFX_WATERPARTICLES)
{
condition = false;
if (precipsector->sector->ffloors)
{
ffloor_t *rover;
for (rover = precipsector->sector->ffloors; rover; rover = rover->next)
{
if (!(rover->flags & FF_EXISTS))
continue;
if (!(rover->flags & FF_SWIMMABLE))
continue;
condition = true;
break;
}
}
}
else
{
condition = (precipsector->sector->ceilingpic == skyflatnum);
}
if (precipsector->sector->flags & SF_INVERTPRECIP)
{