mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-27 16:20:34 +00:00
[Enhancement] Un-patch side rolls (#290)
This commit is contained in:
parent
6fca358aa2
commit
44ded41793
@ -316,6 +316,14 @@ void DrawEnhancementsMenu() {
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (UIWidgets::BeginMenu("Restorations")) {
|
||||
UIWidgets::CVarCheckbox("Side Rolls", "gEnhancements.Restorations.SideRoll", {
|
||||
.tooltip = "Restores side rolling from OOT."
|
||||
});
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (UIWidgets::BeginMenu("Graphics")) {
|
||||
MotionBlur_RenderMenuOptions();
|
||||
ImGui::EndMenu();
|
||||
|
@ -10,6 +10,9 @@ void InitEnhancements() {
|
||||
|
||||
// Masks
|
||||
RegisterFierceDeityAnywhere();
|
||||
|
||||
// Restorations
|
||||
RegisterSideRoll();
|
||||
|
||||
// Time Savers
|
||||
RegisterTimeSaversHooks();
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "Cheats/Infinite.h"
|
||||
#include "Cycle/EndOfCycle.h"
|
||||
#include "Masks/FierceDeityAnywhere.h"
|
||||
#include "Restorations/SideRoll.h"
|
||||
#include "TimeSavers/TimeSavers.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -31,7 +31,8 @@ typedef enum {
|
||||
// Vanilla condition: gSaveContext.showTitleCard
|
||||
GI_VB_SHOW_TITLE_CARD,
|
||||
GI_VB_PLAY_ENTRANCE_CS,
|
||||
GI_VB_DISABLE_FD_MASK
|
||||
GI_VB_DISABLE_FD_MASK,
|
||||
GI_VB_PATCH_SIDEROLL,
|
||||
} GIVanillaBehavior;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
10
mm/2s2h/Enhancements/Restorations/SideRoll.cpp
Normal file
10
mm/2s2h/Enhancements/Restorations/SideRoll.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "Enhancements/GameInteractor/GameInteractor.h"
|
||||
|
||||
void RegisterSideRoll() {
|
||||
REGISTER_VB_SHOULD(GI_VB_PATCH_SIDEROLL, {
|
||||
if (CVarGetInteger("gEnhancements.Restorations.SideRoll", 0)) {
|
||||
*should = false;
|
||||
}
|
||||
});
|
||||
}
|
6
mm/2s2h/Enhancements/Restorations/SideRoll.h
Normal file
6
mm/2s2h/Enhancements/Restorations/SideRoll.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef RESTORATIONS_SIDEROLL_H
|
||||
#define RESTORATIONS_SIDEROLL_H
|
||||
|
||||
void RegisterSideRoll();
|
||||
|
||||
#endif // RESTORATIONS_SIDEROLL_H
|
@ -45,6 +45,8 @@
|
||||
#include "objects/object_link_nuts/object_link_nuts.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
|
||||
#include "2s2h/Enhancements/GameInteractor/GameInteractor.h"
|
||||
|
||||
#define THIS ((Player*)thisx)
|
||||
|
||||
void Player_Init(Actor* thisx, PlayState* play);
|
||||
@ -6615,8 +6617,10 @@ void func_80836AD8(PlayState* play, Player* this) {
|
||||
}
|
||||
|
||||
void func_80836B3C(PlayState* play, Player* this, f32 arg2) {
|
||||
this->currentYaw = this->actor.shape.rot.y;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (GameInteractor_Should(GI_VB_PATCH_SIDEROLL, true, NULL)) {
|
||||
this->currentYaw = this->actor.shape.rot.y;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
}
|
||||
|
||||
if (this->transformation == PLAYER_FORM_GORON) {
|
||||
func_80836AD8(play, this);
|
||||
|
Loading…
Reference in New Issue
Block a user