diff --git a/src/p_mobj.c b/src/p_mobj.c index b79c4e0b2..d738008b8 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9987,10 +9987,13 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype if (mobj->floorz != starting_floorz) mobj->precipflags |= PCF_FOF; - else if (GETSECSPECIAL(mobj->subsector->sector->special, 1) == 7 - || GETSECSPECIAL(mobj->subsector->sector->special, 1) == 6 - || mobj->subsector->sector->floorpic == skyflatnum) - mobj->precipflags |= PCF_PIT; + else + { + INT32 special = GETSECSPECIAL(mobj->subsector->sector->special, 1); + + if (special == 7 || special == 6 || mobj->subsector->sector->floorpic == skyflatnum) + mobj->precipflags |= PCF_PIT; + } R_ResetPrecipitationMobjInterpolationState(mobj);