Skip to content

Commit

Permalink
Adjust arrow checks to allow swapping if arrow is just in hand and no…
Browse files Browse the repository at this point in the history
…t Z Targeting. (#29)
  • Loading branch information
PhlexPlexico authored Feb 7, 2024
1 parent 9a57947 commit c585614
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion code/source/rnd/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ 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;
Expand Down

0 comments on commit c585614

Please sign in to comment.