Skip to content

Commit

Permalink
Revert fast arrow swap changes as it was interfering with fast masks. (
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico authored Feb 12, 2024
1 parent 47d06c3 commit 743dc8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions code/source/rnd/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ namespace rnd::link {
// Reset the override action if the player is not using a bow.
constexpr u8 first = u8(game::Action::Arrow);
constexpr u8 last = u8(game::Action::LightArrow);
const bool is_using = player->action_type == game::act::Player::ActionType::Type3 || player->projectile_actor ||
(player->held_item > game::ItemId::Ocarina && player->held_item < game::ItemId::FairyOcarina);
const bool is_using = player->action_type == game::act::Player::ActionType::Type3 || player->projectile_actor;
if (first > u8(player->current_action) || u8(player->current_action) > last || !is_using) {
s_fast_arrow_state = {};
return;
Expand Down
9 changes: 3 additions & 6 deletions code/source/rnd/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,9 @@ namespace rnd {
// If we're disabled then just run the default return.
if (gSettingsContext.enableFastArrowSwap == 0) {
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->flags1.IsSet(game::act::Player::Flag1::ZTargeting) ||
player->flags1.IsSet(game::act::Player::Flag1::ZTargetingWithoutTarget) ||
player->flags1.IsSet(game::act::Player::Flag1::ZTargetingWithTarget))))
} else if (gSettingsContext.enableFastMaskTransform &&
player->flags1.IsSet(game::act::Player::Flag1::FirstPersonMode) &&
(player->held_item >= game::ItemId::Arrow && player->held_item <= game::ItemId::LightArrow))
return 0x00;
else {
return gSettingsContext.enableFastMaskTransform;
Expand Down

0 comments on commit 743dc8f

Please sign in to comment.