Fix precipitation not working

This commit is contained in:
Sally Coolatta 2020-09-26 02:47:27 -04:00
parent efaf2c8c7d
commit 9042f31dc3

View file

@ -3592,19 +3592,19 @@ void P_PrecipThinker(precipmobj_t *mobj)
return; return;
// adjust height // adjust height
if ((mobj->z += mobj->momz) > mobj->floorz) if ((mobj->z += mobj->momz) <= mobj->floorz)
return;
// no splashes on sky or bottomless pits
if (mobj->precipflags & PCF_PIT)
{ {
mobj->z = mobj->ceilingz; if ((mobj->info->deathstate == S_NULL) || (mobj->precipflags & PCF_PIT)) // no splashes on sky or bottomless pits
return; {
mobj->z = mobj->ceilingz;
}
else
{
P_SetPrecipMobjState(mobj, mobj->info->deathstate);
mobj->z = mobj->floorz;
mobj->precipflags |= PCF_SPLASH;
}
} }
mobj->z = mobj->floorz;
P_SetPrecipMobjState(mobj, mobj->info->deathstate);
mobj->precipflags |= PCF_SPLASH;
} }
static void P_RingThinker(mobj_t *mobj) static void P_RingThinker(mobj_t *mobj)