From 8e3fd29c94bf70e229ba4dd6a16b92449d0ca9fe Mon Sep 17 00:00:00 2001 From: dime-online Date: Sun, 27 Sep 2026 07:17:38 -0400 Subject: [PATCH] client: remember the last haptics amplitude to not skip stop commands The self-assignment in the haptics handler left the stored amplitude at its initial value of 0, so the "skip redundant calls" guard was true for every amplitude-0 packet and haptic_stop() was never called. Rumbles could not be cancelled early and kept playing for their whole duration. Store the newly applied amplitude so the guard only skips stops when nothing was playing. --- client/scenes/stream_actions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/scenes/stream_actions.cpp b/client/scenes/stream_actions.cpp index baab61b0..cf543bf3 100644 --- a/client/scenes/stream_actions.cpp +++ b/client/scenes/stream_actions.cpp @@ -79,7 +79,7 @@ void scenes::stream::operator()(to_headset::haptics && haptics) { XrAction action = it->second.action; float old = it->second.amplitude; - it->second.amplitude = old; + it->second.amplitude = haptics.amplitude; // Some runtimes may be slow to process actions // Skip it if not necessary if (old == 0 and haptics.amplitude == 0)