Skip to content

Commit

Permalink
Reset the shorter clashed ActionData instead of removing it
Browse files Browse the repository at this point in the history
  • Loading branch information
Shute052 committed Feb 19, 2024
1 parent 47f9ffd commit 19b66ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/clashing_inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ impl<A: Actionlike> InputMap<A> {
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());
}
}
}
Expand Down

0 comments on commit 19b66ed

Please sign in to comment.