From 83b6b95ba11443893cfa51fd7a6d771599541058 Mon Sep 17 00:00:00 2001 From: Phlex Date: Wed, 7 Feb 2024 07:20:35 -0600 Subject: [PATCH] Adjust arrow checks to allow swapping if arrow is just in hand and not Z Targeting. --- code/source/main.cpp | 2 +- code/source/rnd/settings.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/source/main.cpp b/code/source/main.cpp index 54d248fc..ac69d41b 100644 --- a/code/source/main.cpp +++ b/code/source/main.cpp @@ -102,7 +102,7 @@ namespace rnd { #if defined ENABLE_DEBUG || defined DEBUG_PRINT auto* saveData = GetContext().gctx->GetPlayerActor(); if (newButtons == (u32)game::pad::Button::ZR) - rnd::util::Print("%s: Player held item is %#04x\n", __func__, saveData->held_item); + rnd::util::Print("%s: Flag is %#08x\n", __func__, saveData->flags1); #endif if (gSettingsContext.customMaskButton != 0 && pressedButtons == gSettingsContext.customMaskButton) { game::ui::OpenScreen(game::ui::ScreenType::Masks); diff --git a/code/source/rnd/settings.cpp b/code/source/rnd/settings.cpp index da760eea..0bf1a3e1 100644 --- a/code/source/rnd/settings.cpp +++ b/code/source/rnd/settings.cpp @@ -113,7 +113,9 @@ namespace rnd { return gSettingsContext.enableFastMaskTransform; } else if ((gSettingsContext.enableFastMaskTransform && player->flags1.IsSet(game::act::Player::Flag1::FirstPersonMode)) || - (player->held_item >= game::ItemId::Arrow && player->held_item <= game::ItemId::LightArrow)) + (player->held_item >= game::ItemId::Arrow && player->held_item <= game::ItemId::LightArrow && + (player->flags1.IsSet(game::act::Player::Flag1::ZTargeting) || player->flags1.IsSet(game::act::Player::Flag1::ZTargetingWithoutTarget) || + player->flags1.IsSet(game::act::Player::Flag1::ZTargetingWithTarget)))) return 0x00; else { return gSettingsContext.enableFastMaskTransform;