Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert fast arrow swap changes as it was interfering with fast masks. #32

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading