Add dashback out of squat (aka dashback out of crouch (aka dbooc)) #2629
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.
Dashback Out of Squat
dbooc.mp4
Preface
This is a first attempt at making changes to HDR so feedback, opinions, ideas, and questions would be appreciated. I can not confidently say that this code is steadfast and will be testing it over the coming days and others testing it would be appreciated. Obvious blunders or mistakes being made apparent would help as well. Getting acquainted with a new codebase and way-of-working is always a process.
Primary Changes
Added two new functions to the install list of
squat.rs:fightercommon_status_squatwait_mainfightercommon_status_squatrv_mainCreated a dashback out of squat checking function,
dashback_in_squat_check, that runs during SquatWait (resting in squat) and SquatRV (standing up from squat), both of which are run each frame during the animation. The logic is mostly based on the backdash logic already present indash.rs, although I separated things out a bit for readability since I have a bit of trouble following rust sometimes.Added a new param to
common.xml:This is referenced in
squat.rsto know whether or not to allow cancelling crouch with dashback. I do not know where I would find this threshold to reference it in-game however. As that would be preferred, do let me know where to find this if you yourself know where.Secondary Changes
Previously, the moonwalk helper code disabled dashback for the entirety of the dash if your stick's Y coordinate was below
-0.5at any point during the dash. This meant that dash forward out of crouch (which already existed) was sometimes entirely locked out of being able to dash back after starting the dash if your stick's y position happened to be below the threshold when starting dash while you were making the quarter-circle motion upwards.moonwalk_from_crouch.mp4
The core logic after the change disregards the concept of unabling
FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_TURN_DASHfor the entirety of dash to begin with, rather moving the threshold check of the current frame in time to the comparison later on that checks to see if a backdash input has been made.Tertiary Changes
Minor bugfix regarding a runtime Rust panic that I encountered due to two u64s being multiplied and triggering an unhandled overflow. I changed the line that panicked to use u64::overflowing_mul instead to avoid this happening in the future.