-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ReplayInputHandler not considering mutliple identical actions #32131
base: master
Are you sure you want to change the base?
Fix ReplayInputHandler not considering mutliple identical actions #32131
Conversation
Not sure how to feel about any of this in general. The core problem here is that your ruleset is allowing more than one object to be hittable with the same binding at a time purposefully and our structures just falling over from that. At the least if this is to pass review in my eyes, this needs a test case explaining what this change is for, and inline documentation next to the change spelling it out why |
Considering that rulesets are allowed to choose their own My ruleset having multiple hit objects at the same time is irrelevant to the problem, as I am simply taking advantage of the flexibility permitted from targeting touch devices, where there can be multiple fingers tapping the same receptor. If a human can perform a sequence of inputs, the replay system must be able to replicate it. That said, I will add a test case and some documentation later. EDIT: My aim was bad and I pressed the "close PR" button. |
I wouldn't call it irrelevant entirely. In every single default ruleset of ours it doesn't matter how many times a binding is pressed, the end result is still the same. But in your case you don't want it to be. It's a significant paradigm shift with subtle implications and I'm not sure how we should be handling it if at all. |
I wasn't really testing ReplayInputHandler, but just the ReplayState.Apply()
46fa892
to
f979954
Compare
I wrote the requested tests, testing how I had to comment out many assertions because the actions triggered by The If replays are supposed to encode the inputs of a player or autoplay, then it would make sense that |
KeyBindingContainers
allow actions to be pressed down multiple times through separate bindings whenSimultaneousBindingMode.All
is used.However,
ReplayInputHandler
did not take this into account. It will only generate anOnPressed
event for the first press of the action, and will only generate anOnRelease
when all presses have been released.This change makes it so that input state changes occur not only based on whether the action exists, but also the number of occurrences of said action.
Before.mp4
After.mp4