From bf4c068e6f4f4e7bbbc07027eb2641884952faa8 Mon Sep 17 00:00:00 2001 From: Arceveti <73617174+Arceveti@users.noreply.github.com> Date: Tue, 5 Oct 2021 10:53:36 -0700 Subject: [PATCH] Add BETTER_BOUNCE --- include/config.h | 2 ++ src/game/interaction.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/config.h b/include/config.h index 929bffc9e..36ed03714 100644 --- a/include/config.h +++ b/include/config.h @@ -121,6 +121,8 @@ #define POLE_SWING // If A and Z are pressed on the same frame, Mario will long jump instead of ground pound. #define EASIER_LONG_JUMPS +// Holding A while bouncing on an enemy will bounce Mario higher +#define BETTER_BOUNCE // 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 diff --git a/src/game/interaction.c b/src/game/interaction.c index 5d67325b3..a28fc2dfa 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1299,7 +1299,11 @@ u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struc #endif return drop_and_set_mario_action(m, ACT_TWIRLING, 0); } else { +#ifdef BETTER_BOUNCE + bounce_off_object(m, obj, (m->input & INPUT_A_DOWN) ? 60.0f : 30.0f); +#else bounce_off_object(m, obj, 30.0f); +#endif } } } else if (take_damage_and_knock_back(m, obj)) { @@ -1337,7 +1341,11 @@ u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Ob #endif return drop_and_set_mario_action(m, ACT_TWIRLING, 0); } else { +#ifdef BETTER_BOUNCE + bounce_off_object(m, obj, (m->input & INPUT_A_DOWN) ? 60.0f : 30.0f); +#else bounce_off_object(m, obj, 30.0f); +#endif } } } else if (take_damage_and_knock_back(m, obj)) {