From aa1343b49ca59d2ac8997f69a5921b64856da84d Mon Sep 17 00:00:00 2001 From: Sapphire Date: Wed, 28 Oct 2026 19:51:17 -0500 Subject: [PATCH] Fix tap reset enable toggle not working --- .../src/main/java/dev/slimevr/tapdetection/behaviours.kt | 6 +++--- .../core/src/main/java/dev/slimevr/tapdetection/module.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/tapdetection/behaviours.kt b/server/core/src/main/java/dev/slimevr/tapdetection/behaviours.kt index 902609351..ba43d37af 100644 --- a/server/core/src/main/java/dev/slimevr/tapdetection/behaviours.kt +++ b/server/core/src/main/java/dev/slimevr/tapdetection/behaviours.kt @@ -44,17 +44,17 @@ class TapDetectionBasicBehaviour : TapDetectionBehaviour { // setupMode uses defaults if (!tapDetectionState.setupMode) { when (trackerState.bodyPart) { - tapDetectionState.yawResetBodyPart -> { + tapDetectionState.yawResetBodyPart if tapDetectionConfig.yawResetEnabled -> { trackerTapDetectionState.performsReset = true trackerTapDetectionState.tapsNeeded = tapDetectionConfig.yawResetTaps } - tapDetectionState.fullResetBodyPart -> { + tapDetectionState.fullResetBodyPart if tapDetectionConfig.fullResetEnabled -> { trackerTapDetectionState.performsReset = true trackerTapDetectionState.tapsNeeded = tapDetectionConfig.fullResetTaps } - tapDetectionState.mountingResetBodyPart -> { + tapDetectionState.mountingResetBodyPart if tapDetectionConfig.mountingResetEnabled -> { trackerTapDetectionState.performsReset = true trackerTapDetectionState.tapsNeeded = tapDetectionConfig.mountingResetTaps } diff --git a/server/core/src/main/java/dev/slimevr/tapdetection/module.kt b/server/core/src/main/java/dev/slimevr/tapdetection/module.kt index e60713813..eecaa6d19 100644 --- a/server/core/src/main/java/dev/slimevr/tapdetection/module.kt +++ b/server/core/src/main/java/dev/slimevr/tapdetection/module.kt @@ -48,9 +48,9 @@ class TapDetectionManager(val context: TapDetectionContext, val server: VRServer val bodyPart = tracker.context.state.value.bodyPart ?: return val tapDetectionConfig = settings.context.state.value.data.tapDetectionConfig val (resetType, actionDelay) = when (bodyPart) { - state.yawResetBodyPart -> ResetType.YAW to tapDetectionConfig.yawResetDelay - state.fullResetBodyPart -> ResetType.FULL to tapDetectionConfig.fullResetDelay - state.mountingResetBodyPart -> ResetType.MOUNTING to tapDetectionConfig.mountingResetDelay + state.yawResetBodyPart if tapDetectionConfig.yawResetEnabled -> ResetType.YAW to tapDetectionConfig.yawResetDelay + state.fullResetBodyPart if tapDetectionConfig.fullResetEnabled -> ResetType.FULL to tapDetectionConfig.fullResetDelay + state.mountingResetBodyPart if tapDetectionConfig.mountingResetEnabled -> ResetType.MOUNTING to tapDetectionConfig.mountingResetDelay else -> return }