More fixes for clawshot touch controls

This commit is contained in:
Luke Street
2026-06-16 13:37:04 -06:00
parent 0c9c8795ce
commit 1fd8a2ca3c
6 changed files with 9 additions and 14 deletions
+1 -1
+1 -1
View File
@@ -4556,7 +4556,7 @@ public:
void handleWolfHowl();
void handleQuickTransform();
bool checkAimContext();
bool checkTouchAimCaptureContext();
bool checkAimInputContext();
void onIronBallChainInterpCallback();
+1 -1
View File
@@ -176,7 +176,7 @@ bool daAlink_c::checkAimContext() {
}
}
bool daAlink_c::checkTouchAimCaptureContext() {
bool daAlink_c::checkAimInputContext() {
switch (mProcID) {
case PROC_HOOKSHOT_ROOF_WAIT:
case PROC_HOOKSHOT_WALL_WAIT:
+3 -3
View File
@@ -123,7 +123,7 @@ BOOL daAlink_c::setBodyAngleToCamera() {
}
#if TARGET_PC
if (dusk::getSettings().game.enableMouseAim && checkAimContext()) {
if (dusk::getSettings().game.enableMouseAim && checkAimInputContext()) {
sp8 = mBodyAngle.x;
} else
#endif
@@ -142,7 +142,7 @@ BOOL daAlink_c::setBodyAngleToCamera() {
#if TARGET_PC
if ((dusk::getSettings().game.enableGyroAim ||
dusk::getSettings().game.enableMouseAim) &&
checkAimContext())
checkAimInputContext())
{
f32 gyro_scale = 1.0f;
if (checkWolfEyeUp()) {
@@ -174,7 +174,7 @@ BOOL daAlink_c::setBodyAngleToCamera() {
}
}
if (dusk::getSettings().game.enableTouchControls && checkAimContext()) {
if (dusk::getSettings().game.enableTouchControls && checkAimInputContext()) {
f32 touchYawDp = 0.0f;
f32 touchPitchDp = 0.0f;
if (dusk::touch_camera::consume_delta(touchYawDp, touchPitchDp)) {
+1 -1
View File
@@ -7505,7 +7505,7 @@ static bool sTouchFreeCameraActive = false;
bool dCamera_c::isAimActive() {
auto* link = daAlink_getAlinkActorClass();
return link != nullptr && link->checkAimContext() &&
return link != nullptr && link->checkAimInputContext() &&
dComIfGp_checkCameraAttentionStatus(link->field_0x317c, 0x10);
}
+2 -7
View File
@@ -156,11 +156,6 @@ 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;
}
@@ -697,7 +692,7 @@ void TouchControls::sync_touch_state() noexcept {
}
sync_l_lock_state();
const bool aimActive = touch_aim_capture_active();
const bool aimActive = dCamera_c::isAimActive();
if (aimActive && mMoveTouch.active) {
if (!mCameraTouch.active) {
mCameraTouch = mMoveTouch;
@@ -1213,7 +1208,7 @@ void TouchControls::handle_touch_down(Rml::Event& event) noexcept {
}
const auto id = touch_event_id(event);
if (touch_aim_capture_active()) {
if (dCamera_c::isAimActive()) {
if (!mCameraTouch.active) {
mCameraTouch = {
.id = id,