summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEblo <7004497+Eblo@users.noreply.github.com>2024-11-11 10:19:07 -0500
committerGitHub <noreply@github.com>2024-11-11 10:19:07 -0500
commit7b11b129f7ee4158a2b6bc295c645bcca94b2d8e (patch)
tree7ad209d3f794ce77f2bd67c56e70387dd26e1008
parentb18eb6b6498dcad1b9ee84f74ba083d35ee3d038 (diff)
Use global player for sword magic form check hook (#828)
-rw-r--r--mm/2s2h/Enhancements/Equipment/TwoHandedSwordSpinAttack.cpp4
-rw-r--r--mm/src/overlays/actors/ovl_player_actor/z_player.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/mm/2s2h/Enhancements/Equipment/TwoHandedSwordSpinAttack.cpp b/mm/2s2h/Enhancements/Equipment/TwoHandedSwordSpinAttack.cpp
index 64d6c706f..53b4df2a1 100644
--- a/mm/2s2h/Enhancements/Equipment/TwoHandedSwordSpinAttack.cpp
+++ b/mm/2s2h/Enhancements/Equipment/TwoHandedSwordSpinAttack.cpp
@@ -34,8 +34,8 @@ void RegisterTwoHandedSwordSpinAttack() {
REGISTER_VB_SHOULD(VB_MAGIC_SPIN_ATTACK_CHECK_FORM, {
if (CVarGetInteger("gEnhancements.Equipment.TwoHandedSwordSpinAttack", 0)) {
// Additionally allow the Fierce Deity form to use charged spin attacks
- PlayerTransformation form = va_arg(args, PlayerTransformation);
- if (form == PLAYER_FORM_FIERCE_DEITY) {
+ Player* player = GET_PLAYER(gPlayState);
+ if (player->transformation == PLAYER_FORM_FIERCE_DEITY) {
*should = true;
}
}
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 38309acb6..2d1491b56 100644
--- a/mm/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/mm/src/overlays/actors/ovl_player_actor/z_player.c
@@ -5269,8 +5269,8 @@ void func_808332A0(PlayState* play, Player* this, s32 magicCost, s32 isSwordBeam
this->stateFlags1 |= PLAYER_STATE1_1000;
if ((this->actor.id == ACTOR_PLAYER) &&
- (isSwordBeam || (GameInteractor_Should(VB_MAGIC_SPIN_ATTACK_CHECK_FORM,
- this->transformation == PLAYER_FORM_HUMAN, this->transformation)))) {
+ (isSwordBeam ||
+ (GameInteractor_Should(VB_MAGIC_SPIN_ATTACK_CHECK_FORM, this->transformation == PLAYER_FORM_HUMAN)))) {
s16 pitch = 0;
Actor* thunder;