diff --git a/RELEASES.md b/RELEASES.md index aa704621a..4111d1469 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -10,6 +10,7 @@ ### Bugs - fixed compilation issues with no-default-features +- fixed [a bug](https://github.com/Leafwing-Studios/leafwing-input-manager/issues/471) related to incorrect clash handling. ## Version 0.12 diff --git a/src/clashing_inputs.rs b/src/clashing_inputs.rs index 20a3cafa9..e9255c7a4 100644 --- a/src/clashing_inputs.rs +++ b/src/clashing_inputs.rs @@ -92,9 +92,9 @@ impl InputMap { clash_strategy: ClashStrategy, ) { for clash in self.get_clashes(action_data, input_streams) { - // Remove the action in the pair that was overruled, if any + // Reset the action in the pair that was overruled, if any if let Some(culled_action) = resolve_clash(&clash, clash_strategy, input_streams) { - action_data.remove(&culled_action); + action_data.insert(culled_action, ActionData::default()); } } }