Fix hookshot hanging w/ touch controls

This commit is contained in:
Luke Street
2026-06-15 22:55:30 -06:00
parent db87b91954
commit 8e9d4d624a
3 changed files with 18 additions and 2 deletions
+1
View File
@@ -4556,6 +4556,7 @@ public:
void handleWolfHowl();
void handleQuickTransform();
bool checkAimContext();
bool checkTouchAimCaptureContext();
void onIronBallChainInterpCallback();
+10
View File
@@ -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();
}
}
+7 -2
View File
@@ -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,