From 98d0a0d98eed8450fc1bea3b442ae4d0dc183ce4 Mon Sep 17 00:00:00 2001 From: lachwright Date: Tue, 24 Sep 2019 03:54:04 +0800 Subject: [PATCH] Added bounce-off behavior for multi-hit enemies/bosses --- src/p_inter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/p_inter.c b/src/p_inter.c index bfdec3e23..7f78fcfc9 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -471,6 +471,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) toucher->momy = -toucher->momy; if (player->charability == CA_FLY && player->panim == PA_ABILITY) toucher->momz = -toucher->momz/2; + else if (player->charability == CA_GLIDEANDCLIMB && player->pflags & PF_GLIDING && !P_IsObjectOnGround(player->mo)) + { + player->pflags &= ~(PF_GLIDING|PF_JUMPED|PF_NOJUMPDAMAGE); + P_SetPlayerMobjState(player->mo, S_PLAY_FALL); + } } P_DamageMobj(special, toucher, toucher, 1, 0); if (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)