Revert "gogo: only set locomotion if has the explicit other value"

This reverts commit df6aec0884.
This commit is contained in:
galister committed 2024-10-04 00:06:05 +09:00
1 parent 170a406d93
commit 419f789cb7
1 file changed
+5 -4
+5 -4
View File
@@ -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(&not_want_loco) {
if parameters.get(LOCO_PARAM) != Some(&want_loco) {
info!("Set Locomotion: {:?}", want_loco);
bundle.send_parameter(LOCO_PARAM, want_loco);
}
}