Use global player for sword magic form check hook (#828)
Some checks are pending
generate-builds / generate-2ship-otr (push) Waiting to run
generate-builds / build-macos (push) Blocked by required conditions
generate-builds / build-linux (push) Blocked by required conditions
generate-builds / build-windows (push) Blocked by required conditions

This commit is contained in:
Eblo 2024-11-11 10:19:07 -05:00 committed by GitHub
parent b18eb6b649
commit 7b11b129f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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;