From 9769ad48e0a4da797ba0c3aa0fd97bf332dff7d7 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 15 Mar 2022 13:12:56 +0100 Subject: [PATCH] Prevent Hangsters from sliding across the ceiling. --- src/p_mobj.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 17be0300a..8cc91c18e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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) @@ -10477,7 +10480,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) if (type == MT_NULL) { -#if 0 +#if 0 #ifdef PARANOIA I_Error("Tried to spawn MT_NULL\n"); #endif