summaryrefslogtreecommitdiff
path: root/soh/src
diff options
context:
space:
mode:
authorbriaguya <70942617+briaguya-ai@users.noreply.github.com>2024-04-30 23:36:26 -0400
committerGitHub <noreply@github.com>2024-04-30 22:36:26 -0500
commit7da6a5b604f3fe2143fabdea9b5dcd154aaa5edd (patch)
tree51a203b46027b8f234f2639b617d82835715988d /soh/src
parentbaaa00569d13ab690fa837295091a6efba0e4907 (diff)
vb deku stick cheat (#115)
* vb deku stick cheat * it's the 21st now --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Diffstat (limited to 'soh/src')
-rw-r--r--soh/src/overlays/actors/ovl_player_actor/z_player.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c
index 2b994f56f..43a34c778 100644
--- a/soh/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c
@@ -8515,15 +8515,14 @@ void func_80842A28(PlayState* play, Player* this) {
}
void func_80842A88(PlayState* play, Player* this) {
- if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
- Inventory_ChangeAmmo(ITEM_STICK, -1);
- Player_UseItem(play, this, ITEM_NONE);
- }
+ Inventory_ChangeAmmo(ITEM_STICK, -1);
+ Player_UseItem(play, this, ITEM_NONE);
}
s32 func_80842AC4(PlayState* play, Player* this) {
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) {
- if (AMMO(ITEM_STICK) != 0 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
+
+ if (GameInteractor_Should(GI_VB_DEKU_STICK_BREAK, AMMO(ITEM_STICK) != 0, NULL)) {
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],
this->actor.shape.rot.y + 0x8000);
this->unk_85C = 0.5f;
@@ -10942,37 +10941,30 @@ static Vec3f D_808547B0 = { 0.0f, 0.5f, 0.0f };
static Color_RGBA8 D_808547BC = { 255, 255, 100, 255 };
static Color_RGBA8 D_808547C0 = { 255, 50, 0, 0 };
-void func_80848A04(PlayState* play, Player* this) {
+void Player_UpdateBurningDekuStick(PlayState* play, Player* this) {
f32 temp;
- if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
- f32 temp2 = 1.0f; // Secondary temporary variable to use with the alleged draw flame function
- this->unk_860 = 200; // Keeps the stick's flame lit
- this->unk_85C = 1.0f; // Ensures the stick is the proper length
- func_8002836C(play, &this->meleeWeaponInfo[0].tip, &D_808547A4, &D_808547B0, &D_808547BC, &D_808547C0, temp2 * 200.0f,
- 0, 8); // I believe this draws the flame effect
- }
-
- if (this->unk_85C == 0.0f && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
- Player_UseItem(play, this, 0xFF);
+ if (GameInteractor_Should(GI_VB_DEKU_STICK_BURN_OUT, this->unk_85C == 0.0f, NULL)) {
+ Player_UseItem(play, this, ITEM_NONE);
return;
}
temp = 1.0f;
- if (DECR(this->unk_860) == 0 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
+ uint8_t vanillaShouldBurnOutCondition = DECR(this->unk_860) == 0;
+ if (GameInteractor_Should(GI_VB_DEKU_STICK_BURN_OUT, vanillaShouldBurnOutCondition, NULL)) {
Inventory_ChangeAmmo(ITEM_STICK, -1);
this->unk_860 = 1;
temp = 0.0f;
this->unk_85C = temp;
} else if (this->unk_860 > 200) {
temp = (210 - this->unk_860) / 10.0f;
- } else if (this->unk_860 < 20 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
+ } else if (GameInteractor_Should(GI_VB_DEKU_STICK_BURN_DOWN, this->unk_860 < 20, NULL)) {
temp = this->unk_860 / 20.0f;
this->unk_85C = temp;
}
- func_8002836C(play, &this->meleeWeaponInfo[0].tip, &D_808547A4, &D_808547B0, &D_808547BC, &D_808547C0, temp * 200.0f,
- 0, 8);
+ func_8002836C(play, &this->meleeWeaponInfo[0].tip, &D_808547A4, &D_808547B0, &D_808547BC, &D_808547C0,
+ temp * 200.0f, 0, 8);
}
void Player_UpdateBodyShock(PlayState* play, Player* this) {
@@ -11267,8 +11259,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
func_808473D4(play, this);
func_80836BEC(this, play);
- if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && ((this->unk_860 != 0) || CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) {
- func_80848A04(play, this);
+ if (this->heldItemAction == PLAYER_IA_DEKU_STICK &&
+ GameInteractor_Should(GI_VB_DEKU_STICK_BE_ON_FIRE, this->unk_860 != 0, NULL)) {
+ Player_UpdateBurningDekuStick(play, this);
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
this->unk_860++;
}