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.
_was_in_shieldstun()
problem:When buffering from shield status is never "shieldstun", it is instead 29 (I haven't figured out what 29 is, but 28 is holding shield and 30 is shieldstun).
If the attack is really minus (on hit or shield), the cpu would have time to go into other states and checking for hitstun or shieldstun would not work when trying to update frame advantage so I removed this check.
Instead I make sure that
FRAME_ADVANTAGE_CHECK
is only true when a hit connect (I uncommented theis_infliction()
condition, maybe good to look intois_infliction_status()
too). That however does not work with projectile, maybe the condition should just be that the CPU enters hitstun or block stun, I haven't thought enough about this nor tested it.The
is_enable_transition_term()
function returns "false" for 1 frame when going from actionable states to actionable states, like from crouching to standing, standing to walking etc...That can mean that on some move the "actionable" state of the player turns to false again before the CPU is out of hitstun (think drag down aerials) to prevent that, the "active frame" variable is now a signed int that uses -1 as a flag to indicate it has not been updated in this current interaction. This also prevent the same issue if on a really positive move, the player would input a whiffed action before the end of the cpu hitstun.
Also the
was_in_hitstun
function actually checks the previous status, but when not mashing, the CPU stays in hitstun even when actionable. We could store the value ofWorkModule::get_float(cpu_module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_DAMAGE_REACTION_FRAME)
for the next frame, as this does return the number of frames left before being actionable in hitstun (well not really the frames because of baloon KB multiplicator but I won't discuss that here, what's important is that if it was not 0 on the last frame, and is 0 now, this is a more accuratewas_in_hitstun
indicator regarding actionability).I haven't touched the "Extra check later in the frame" but it probably deserves some love, I'm not yet sure why it's needed as I couldn't reproduce the issue it says it fixes in the comment.