Skip to content

Commit

Permalink
link: Fix Goron roll classic mode
Browse files Browse the repository at this point in the history
  • Loading branch information
leoetlino committed Aug 31, 2019
1 parent c49e347 commit d7f0833
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/rst/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ bool SwitchToZoraFastSwim(game::GlobalContext* gctx, game::act::Player* player,

bool ShouldEndGoronRoll(game::act::Player* player) {
return player->controller_info.state->input.new_buttons.IsSet(game::pad::Button::A) ||
player->controller_info.state->input.released_buttons.IsSet(game::pad::Button::A);
(player->controller_info.state->input.released_buttons.IsSet(game::pad::Button::A) &&
GetContext().a_press_duration >= 15);
}

struct FastArrowState {
Expand Down
10 changes: 10 additions & 0 deletions v100/hooks.hks
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ goron_roll_classic_end_trigger:
link: true
addr: 0x1F7A3C
func: rst_trampoline_rst_link_ShouldEndGoronRoll
goron_roll_classic_end_trigger_fast:
type: patch
addr: 0x1F7DCC
# mov r0, r4
data: 04 00 A0 E1
goron_roll_classic_end_trigger_fast:
type: branch
link: true
addr: 0x1F7DD0
func: rst_trampoline_rst_link_ShouldEndGoronRoll

decouple_trigger_btns:
type: patch
Expand Down

0 comments on commit d7f0833

Please sign in to comment.