From 419f789cb75047cbb818eb4e9ee958490a1bfbdc Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Fri, 4 Oct 2024 00:06:05 +0900 Subject: [PATCH] Revert "gogo: only set locomotion if has the explicit other value" This reverts commit df6aec0884f42d5056024b952e99480632c146ff. --- src/core/ext_gogo.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/ext_gogo.rs b/src/core/ext_gogo.rs index 31a30d0..cd21fed 100644 --- a/src/core/ext_gogo.rs +++ b/src/core/ext_gogo.rs @@ -100,13 +100,14 @@ impl ExtGogo { pub fn step(&mut self, parameters: &AvatarParameters, bundle: &mut OscBundle) { if let Some(OscType::Int(tracking)) = parameters.get(TRACKING_TYPE) { - let (want_loco, not_want_loco) = if 5 < *tracking { - (OscType::Bool(true), OscType::Bool(false)) + let want_loco = if 5 < *tracking { + OscType::Bool(true) } else { - (OscType::Bool(false), OscType::Bool(true)) + OscType::Bool(false) }; - if parameters.get(LOCO_PARAM) == Some(¬_want_loco) { + if parameters.get(LOCO_PARAM) != Some(&want_loco) { + info!("Set Locomotion: {:?}", want_loco); bundle.send_parameter(LOCO_PARAM, want_loco); } }