diff --git a/README.md b/README.md index bd4935dd..057743a2 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - Toggle to disable fall damage and the fall damage sound * - Nonstop stars * - Removed course-specific camera processing * +- You can increase the number of frames that you have to perform a firsty * **Hacker QOL:** - Global, non-level based, star IDs (off by default) * diff --git a/include/config.h b/include/config.h index 3356ac6f..e2c7f3eb 100644 --- a/include/config.h +++ b/include/config.h @@ -74,6 +74,8 @@ #define JUMP_KICK_FIX // Allow Mario to grab hangable ceilings from any state #define HANGING_FIX +// The last frame that will be considered a firsty when wallkicking +#define FIRSTY_LAST_FRAME 1 // 46 degree walkicks //#define WALLKICKS_46_DEGREES // Disable BLJs and crush SimpleFlips's dreams diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index fb693460..61b2f357 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -14,6 +14,8 @@ #include "save_file.h" #include "rumble_init.h" +#include "config.h" + void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3) { s32 animFrame = m->marioObj->header.gfx.animInfo.animFrame; if (animFrame == frame1 || animFrame == frame2 || animFrame == frame3) { @@ -1308,7 +1310,7 @@ s32 act_air_hit_wall(struct MarioState *m) { mario_drop_held_object(m); } - if (++(m->actionTimer) <= 2) { + if (++(m->actionTimer) <= FIRSTY_LAST_FRAME) { if (m->input & INPUT_A_PRESSED) { m->vel[1] = 52.0f; m->faceAngle[1] += 0x8000; @@ -1334,10 +1336,14 @@ s32 act_air_hit_wall(struct MarioState *m) { return set_mario_action(m, ACT_SOFT_BONK, 0); } -#ifdef AVOID_UB +/*#ifdef AVOID_UB return -#endif +#endif*/ +#if FIRSTY_LAST_FRAME > 1 set_mario_animation(m, MARIO_ANIM_START_WALLKICK); +#endif + + return FALSE; //! Missing return statement. The returned value is the result of the call // to set_mario_animation. In practice, this value is nonzero.