mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
[Enhancement] Increase Climb Speed (#314)
* Increase Climb Speed * Rename Menu * Update BenMenuBar.cpp
This commit is contained in:
committed by
Garrett Cox
parent
a64b76ee64
commit
3462b7cb87
@@ -452,6 +452,13 @@ void DrawEnhancementsMenu() {
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (UIWidgets::BeginMenu("Player Movement")) {
|
||||
UIWidgets::CVarSliderInt("Climb speed", "gEnhancements.PlayerMovement.ClimbSpeed", 1, 5, 1, {
|
||||
.tooltip = "Increases the speed at which Link climbs vines and ladders."
|
||||
});
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (UIWidgets::BeginMenu("Restorations")) {
|
||||
UIWidgets::CVarCheckbox("Power Crouch Stab", "gEnhancements.Restorations.PowerCrouchStab", {
|
||||
|
||||
@@ -39,4 +39,7 @@ void InitEnhancements() {
|
||||
// Modes
|
||||
RegisterPlayAsKafei();
|
||||
|
||||
// Player Movement
|
||||
RegisterClimbSpeed();
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Restorations/SideRoll.h"
|
||||
#include "Restorations/TatlISG.h"
|
||||
#include "Graphics/PlayAsKafei.h"
|
||||
#include "PlayerMovement/ClimbSpeed.h"
|
||||
#include "Songs/EnableSunsSong.h"
|
||||
|
||||
enum AlwaysWinDoggyRaceOptions {
|
||||
|
||||
@@ -40,6 +40,7 @@ typedef enum {
|
||||
GI_VB_PATCH_SIDEROLL,
|
||||
GI_VB_TATL_CONVERSATION_AVAILABLE,
|
||||
GI_VB_PREVENT_MASK_TRANSFORMATION_CS,
|
||||
GI_VB_SET_CLIMB_SPEED,
|
||||
GI_VB_PREVENT_CLOCK_DISPLAY,
|
||||
GI_VB_SONG_AVAILABLE_TO_PLAY,
|
||||
GI_VB_USE_CUSTOM_CAMERA,
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "Enhancements/GameInteractor/GameInteractor.h"
|
||||
|
||||
void RegisterClimbSpeed() {
|
||||
REGISTER_VB_SHOULD(GI_VB_SET_CLIMB_SPEED, {
|
||||
if (CVarGetInteger("gEnhancements.PlayerMovement.ClimbSpeed", 1) >1) {
|
||||
f32* speed = static_cast<f32*>(opt);
|
||||
*speed *= CVarGetInteger("gEnhancements.PlayerMovement.ClimbSpeed", 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef PLAYER_MOVEMENT_CLIMB_SPEED_H
|
||||
#define PLAYER_MOVEMENT_CLIMB_SPEED_H
|
||||
|
||||
void RegisterClimbSpeed();
|
||||
|
||||
#endif // PLAYER_MOVEMENT_CLIMB_SPEED_H
|
||||
@@ -16000,7 +16000,9 @@ void Player_Action_50(Player* this, PlayState* play) {
|
||||
var_fv1 = -1.0f;
|
||||
}
|
||||
|
||||
this->skelAnime.playSpeed = var_fv1 * var_fv0;
|
||||
if (GameInteractor_Should(GI_VB_SET_CLIMB_SPEED, true, &var_fv1)) {
|
||||
this->skelAnime.playSpeed = var_fv1 * var_fv0;
|
||||
}
|
||||
|
||||
if (this->av2.actionVar2 >= 0) {
|
||||
if ((this->actor.wallPoly != NULL) && (this->actor.wallBgId != BGCHECK_SCENE)) {
|
||||
|
||||
Reference in New Issue
Block a user