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 }