diff --git a/mm/2s2h/BenGui/SearchableMenuItems.h b/mm/2s2h/BenGui/SearchableMenuItems.h index dac286c82..1cfeb1b34 100644 --- a/mm/2s2h/BenGui/SearchableMenuItems.h +++ b/mm/2s2h/BenGui/SearchableMenuItems.h @@ -1078,7 +1078,9 @@ void AddEnhancements() { "Speeds up the time it takes to be able to get maximum height from launching out of a deku flower", WIDGET_CVAR_CHECKBOX }, { "Infinite Deku Hopping", "gEnhancements.Player.InfiniteDekuHopping", - "Allows Deku Link to hop indefinitely in water without drowning.", WIDGET_CVAR_CHECKBOX }, + "Allows Deku Link to hop indefinitely in water without drowning. This also prevents the velocity loss " + "while in the air.", + WIDGET_CVAR_CHECKBOX }, { "Instant Putaway", "gEnhancements.Player.InstantPutaway", "Allows Link to instantly puts away held item without waiting.", WIDGET_CVAR_CHECKBOX }, { "Fierce Deity Putaway", "gEnhancements.Player.FierceDeityPutaway", diff --git a/mm/2s2h/Enhancements/Player/InfiniteDekuHopping.cpp b/mm/2s2h/Enhancements/Player/InfiniteDekuHopping.cpp index 2774b0847..b8c665eee 100644 --- a/mm/2s2h/Enhancements/Player/InfiniteDekuHopping.cpp +++ b/mm/2s2h/Enhancements/Player/InfiniteDekuHopping.cpp @@ -16,6 +16,13 @@ void RegisterInfiniteDekuHopping() { player->remainingHopsCounter = 5; } }); + + COND_VB_SHOULD(VB_SET_DEKU_FORM_JUMP_SPEED_TARGET_MULTIPLIER, CVAR, { + f32* dekuSpeedTargetMultiplier = va_arg(args, f32*); + + *dekuSpeedTargetMultiplier = 1.0f; + *should = false; + }); } static RegisterShipInitFunc initFunc(RegisterInfiniteDekuHopping, { CVAR_NAME }); diff --git a/mm/2s2h/GameInteractor/GameInteractor.h b/mm/2s2h/GameInteractor/GameInteractor.h index 4dcc07bb8..0a3417c22 100644 --- a/mm/2s2h/GameInteractor/GameInteractor.h +++ b/mm/2s2h/GameInteractor/GameInteractor.h @@ -93,6 +93,7 @@ typedef enum { VB_GORON_ROLL_INCREASE_SPIKE_LEVEL, VB_GORON_ROLL_DISABLE_SPIKE_MODE, VB_DEKU_LINK_SPIN_ON_LAST_HOP, + VB_SET_DEKU_FORM_JUMP_SPEED_TARGET_MULTIPLIER, } GIVanillaBehavior; typedef enum { diff --git a/mm/src/overlays/actors/ovl_player_actor/z_player.c b/mm/src/overlays/actors/ovl_player_actor/z_player.c index 6531c49dc..2724082ea 100644 --- a/mm/src/overlays/actors/ovl_player_actor/z_player.c +++ b/mm/src/overlays/actors/ovl_player_actor/z_player.c @@ -15014,9 +15014,14 @@ void Player_Action_25(Player* this, PlayState* play) { if (this->transformation == PLAYER_FORM_DEKU) { s16 prevYaw = this->currentYaw; + f32 dekuSpeedTargetMultiplier; + if (GameInteractor_Should(VB_SET_DEKU_FORM_JUMP_SPEED_TARGET_MULTIPLIER, true, + &dekuSpeedTargetMultiplier)) { + dekuSpeedTargetMultiplier = 0.5f; + } func_808378FC(play, this); - func_8083CBC4(this, speedTarget * 0.5f, yawTarget, 2.0f, 0.2f, 0.1f, 0x190); + func_8083CBC4(this, speedTarget * dekuSpeedTargetMultiplier, yawTarget, 2.0f, 0.2f, 0.1f, 0x190); if (BEN_ANIM_EQUAL(this->skelAnime.animation, gPlayerAnim_pn_attack)) { this->stateFlags2 |= (PLAYER_STATE2_20 | PLAYER_STATE2_40);