From 027ffdba95bc0bd585dfe2a4b64488103a25c755 Mon Sep 17 00:00:00 2001 From: Reonu Date: Sun, 27 Jun 2021 12:57:07 +0100 Subject: [PATCH] added toggle to disable fall damage --- include/config.h | 2 ++ src/game/mario_actions_airborne.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/config.h b/include/config.h index d39c14e5..32a04950 100644 --- a/include/config.h +++ b/include/config.h @@ -69,6 +69,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 +// Disables fall damage +#define NO_FALL_DAMAGE // Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC) //#define GLOBAL_STAR_IDS // Uncomment this if you want to skip the title screen (Super Mario 64 logo) diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index f2ea0b90..fda9e4c8 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -59,6 +59,7 @@ s32 lava_boost_on_wall(struct MarioState *m) { } s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) { +#ifndef NO_FALL_DAMAGE f32 fallHeight; f32 damageHeight; @@ -97,7 +98,7 @@ s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) { } } } - +#endif return FALSE; }