diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index fa75c085fb..a3cd2cbfed 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -4556,6 +4556,7 @@ public: void handleWolfHowl(); void handleQuickTransform(); bool checkAimContext(); + bool checkTouchAimCaptureContext(); void onIronBallChainInterpCallback(); diff --git a/src/d/actor/d_a_alink_dusk.cpp b/src/d/actor/d_a_alink_dusk.cpp index b787eebcaa..b1d06c089f 100644 --- a/src/d/actor/d_a_alink_dusk.cpp +++ b/src/d/actor/d_a_alink_dusk.cpp @@ -175,3 +175,13 @@ bool daAlink_c::checkAimContext() { return false; } } + +bool daAlink_c::checkTouchAimCaptureContext() { + switch (mProcID) { + case PROC_HOOKSHOT_ROOF_WAIT: + case PROC_HOOKSHOT_WALL_WAIT: + return false; + default: + return checkAimContext(); + } +} diff --git a/src/dusk/ui/touch_controls.cpp b/src/dusk/ui/touch_controls.cpp index a85a90930f..e10ca399c6 100644 --- a/src/dusk/ui/touch_controls.cpp +++ b/src/dusk/ui/touch_controls.cpp @@ -156,6 +156,11 @@ bool player_attention_locked() noexcept { return player != nullptr && (player->checkAttentionLock() || player->checkEnemyAttentionLock()); } +bool touch_aim_capture_active() noexcept { + auto* player = daAlink_getAlinkActorClass(); + return player != nullptr && player->checkTouchAimCaptureContext() && dCamera_c::isAimActive(); +} + bool item_wheel_active() noexcept { return dMeter2Info_getWindowStatus() == 2; } @@ -692,7 +697,7 @@ void TouchControls::sync_touch_state() noexcept { } sync_l_lock_state(); - const bool aimActive = dCamera_c::isAimActive(); + const bool aimActive = touch_aim_capture_active(); if (aimActive && mMoveTouch.active) { if (!mCameraTouch.active) { mCameraTouch = mMoveTouch; @@ -1208,7 +1213,7 @@ void TouchControls::handle_touch_down(Rml::Event& event) noexcept { } const auto id = touch_event_id(event); - if (dCamera_c::isAimActive()) { + if (touch_aim_capture_active()) { if (!mCameraTouch.active) { mCameraTouch = { .id = id,