Repository navigation
tecs.controller: release an action when a rebind takes away what held it - #19
Open
albanmgicquel wants to merge 1 commit into
Open
albanmgicquel wants to merge 1 commit into
albanmgicquel wants to merge 1 commit into
Conversation
Releases came only from a bound input's edges, so a rebind that removed the binding holding an action down turned isDown false without isReleased ever firing, and a game waiting for the release never saw it. Rebind now compares each action before and after the new mapping and fires one release for an action that was down and no longer is, including one the new mapping leaves out. The release reads through a new input.Edge, an edge Input tiers but does not fold from events: it reads in the frame tier until the next beginFrame, latches until the end of the next fixed step, and clears when the blocking layer changes, like a physical edge. A held input newly bound still reports no press.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A rebind that took a held input away from an action turned
isDownfalse but never firedisReleased, so a game waiting for the release never saw it: a plunger that launches on release, or a flipper that stays up.Changes
rebindreleases what it takes away. Every action that was down before the rebind and isn't after it fires one release, including an action dropped from the mapping and a held axis binding that was removed. An action still held through another binding fires nothing. A held input newly bound to an action still produces no press.input.Edge: a newInput:newEdge()returns an edge withfire()andfired(layer?). A fired edge reads like a physical one: true until the nextbeginFrame, latched until the end of the next fixed step, and cleared when the blocking layer changes. The controller fires its rebind releases through it, so they follow the same frame and fixed-step rules as key releases.rebindnever raises on them.rebindandisReleaseddocblocks, the controller guide and the input guide.Tests
Edgecontract.nupp checkandnupp task format-checkare clean, andnupp testpasses all 1,064 tests.docs-checkdoesn't run in my local setup: it stops on a missinglunamarkrock in the Nupp checkout, andmainstops there too. The Rust gates weren't run, since this PR changes no Rust.