From 03fc981466ed3b5dce064d7824d868b51bd059db Mon Sep 17 00:00:00 2001 From: Reonu Date: Wed, 30 Jun 2021 22:27:43 +0100 Subject: [PATCH] added hanging fix for real --- include/config.h | 2 ++ src/game/mario_step.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/config.h b/include/config.h index 5f392c2a..9cb3722e 100644 --- a/include/config.h +++ b/include/config.h @@ -70,6 +70,8 @@ #define NO_FALSE_LEDGEGRABS // Allows Mario to jump kick on steep surfaces that are set to be non slippery, instead of being forced to dive #define JUMP_KICK_FIX +// Allow Mario to grab hangable ceilings from any state +#define HANGING_FIX // 46 degree walkicks //#define WALLKICKS_46_DEGREES // Disables fall damage diff --git a/src/game/mario_step.c b/src/game/mario_step.c index 7638e59f..210b19bd 100644 --- a/src/game/mario_step.c +++ b/src/game/mario_step.c @@ -450,8 +450,12 @@ s32 perform_air_quarter_step(struct MarioState *m, Vec3f intendedPos, u32 stepAr m->vel[1] = 0.0f; //! Uses referenced ceiling instead of ceil (ceiling hang upwarp) + #ifdef HANGING_FIX + if (m->ceil != NULL && m->ceil->type == SURFACE_HANGABLE) { + #else if ((stepArg & AIR_STEP_CHECK_HANG) && m->ceil != NULL && m->ceil->type == SURFACE_HANGABLE) { + #endif return AIR_STEP_GRABBED_CEILING; }