mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
[Enhancement] Constant Distance Backflips/Sidehops (#291)
This commit is contained in:
@@ -489,6 +489,9 @@ void DrawEnhancementsMenu() {
|
||||
}
|
||||
|
||||
if (UIWidgets::BeginMenu("Restorations")) {
|
||||
UIWidgets::CVarCheckbox(
|
||||
"Constant Distance Backflips and Sidehops", "gEnhancements.Restorations.ConstantFlipsHops",
|
||||
{ .tooltip = "Backflips and Sidehops travel a constant distance as they did in OOT." });
|
||||
UIWidgets::CVarCheckbox(
|
||||
"Power Crouch Stab", "gEnhancements.Restorations.PowerCrouchStab",
|
||||
{ .tooltip =
|
||||
|
||||
@@ -31,6 +31,7 @@ void InitEnhancements() {
|
||||
RegisterPowerCrouchStab();
|
||||
RegisterSideRoll();
|
||||
RegisterTatlISG();
|
||||
RegisterVariableFlipHop();
|
||||
|
||||
// Cutscenes
|
||||
RegisterCutscenes();
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Masks/FastTransformation.h"
|
||||
#include "Minigames/AlwaysWinDoggyRace.h"
|
||||
#include "Cutscenes/Cutscenes.h"
|
||||
#include "Restorations/FlipHopVariable.h"
|
||||
#include "Restorations/PowerCrouchStab.h"
|
||||
#include "Restorations/SideRoll.h"
|
||||
#include "Restorations/TatlISG.h"
|
||||
|
||||
@@ -44,10 +44,10 @@ typedef enum {
|
||||
GI_VB_PREVENT_CLOCK_DISPLAY,
|
||||
GI_VB_SONG_AVAILABLE_TO_PLAY,
|
||||
GI_VB_USE_CUSTOM_CAMERA,
|
||||
|
||||
GI_VB_PLAY_TRANSITION_CS,
|
||||
GI_VB_TATL_INTERUPT_MSG3,
|
||||
GI_VB_TATL_INTERUPT_MSG6
|
||||
GI_VB_TATL_INTERUPT_MSG6,
|
||||
GI_VB_FLIP_HOP_VARIABLE,
|
||||
} GIVanillaBehavior;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "Enhancements/GameInteractor/GameInteractor.h"
|
||||
|
||||
void RegisterVariableFlipHop() {
|
||||
REGISTER_VB_SHOULD(GI_VB_FLIP_HOP_VARIABLE, {
|
||||
if (CVarGetInteger("gEnhancements.Restorations.ConstantFlipsHops", 0)) {
|
||||
*should = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef RESTORATIONS_FLIP_HOP_VARIABLE_H
|
||||
#define RESTORATIONS_FLIP_HOP_VARIABLE_H
|
||||
|
||||
void RegisterVariableFlipHop();
|
||||
|
||||
#endif // RESTORATIONS_FLIP_HOP_VARIABLE_H
|
||||
@@ -14873,7 +14873,9 @@ void Player_Action_25(Player* this, PlayState* play) {
|
||||
Math_StepToF(&this->unk_B10[1], 0.0f, this->unk_B10[0]);
|
||||
}
|
||||
} else {
|
||||
func_8083CBC4(this, speedTarget, yawTarget, 1.0f, 0.05f, 0.1f, 0xC8);
|
||||
if (GameInteractor_Should(GI_VB_FLIP_HOP_VARIABLE, true, NULL)) {
|
||||
func_8083CBC4(this, speedTarget, yawTarget, 1.0f, 0.05f, 0.1f, 0xC8);
|
||||
}
|
||||
}
|
||||
|
||||
Player_UpdateUpperBody(this, play);
|
||||
|
||||
Reference in New Issue
Block a user