Prevent Hangsters from sliding across the ceiling.

This commit is contained in:
spherallic 2022-03-15 13:12:56 +01:00
parent 29892a5f0c
commit 9769ad48e0

View file

@ -8433,7 +8433,10 @@ static boolean P_HangsterThink(mobj_t *mobj)
}
//after swooping back up, check for ceiling
else if ((st == S_HANGSTER_RETURN1 || st == S_HANGSTER_RETURN2) && mobj->momz == 0 && mobj->ceilingz == (mobj->z + mobj->height))
{
P_SetMobjState(mobj, (st = S_HANGSTER_RETURN3));
mobj->momx = mobj->momy = 0;
}
//should you roost on a ceiling with F_SKY1 as its flat, disappear forever
if (st == S_HANGSTER_RETURN3 && mobj->momz == 0 && mobj->ceilingz == (mobj->z + mobj->height)