Implement Melee-style knockback stacking (#97)
CI / build-and-test (push) Successful in 2m11s
CI / production-build (push) Successful in 12m25s

## Summary

- stack residual airborne knockback per axis after the configured launch-frame threshold
- apply DI after combining the launch vectors while retaining the second hit's hitstun
- preserve and decay residual knockback after hitstun
- make stacking state rollback-safe and include it in debug save states
- clear launch state on landing, ledge interactions, KO, and respawn

## Testing

- `cargo check --tests`
- `cargo test` (159 tests passed)
- `git diff --check`

## Asset configuration

For Melee timing, `knockback_stacking_window` should be set to `10`. The local ignored asset package has been updated accordingly.

Reviewed-on: #97
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #97.
This commit is contained in:
2026-10-25 21:02:13 +00:00
committed by EIREXE
parent 7f720119fa
commit cbb357d30a
13 changed files with 260 additions and 30 deletions
+5 -2
View File
@@ -41,8 +41,8 @@ use crate::{
fighter::{
attack::{
AttackKind, FighterAttackPlugin, FighterAttackScriptAssets, FighterDamage,
FighterKnockbackVelocity, FighterPendingHitReaction, FighterSolvedHurtboxes,
FighterStaleMoveQueue,
FighterKnockbackState, FighterKnockbackVelocity, FighterPendingHitReaction,
FighterSolvedHurtboxes, FighterStaleMoveQueue,
},
baked_animation::FighterBoneIndexMap,
ecb::{FighterDesiredECB, FighterECBBoneIndices},
@@ -212,6 +212,7 @@ pub struct FighterPendingRespawn(bool);
FighterHitstop,
FighterLedgeInformation,
FighterKnockbackVelocity,
FighterKnockbackState,
FighterTranslation,
FighterInvulnerabilityState,
FighterInvulnerabilityVisualState
@@ -330,6 +331,8 @@ impl Plugin for FighterPlugin {
.checksum_component_with_hash::<FighterInvulnerabilityState>()
.rollback_component_with_copy::<FighterKnockbackVelocity>()
.checksum_component_with_hash::<FighterKnockbackVelocity>()
.rollback_component_with_copy::<FighterKnockbackState>()
.checksum_component_with_hash::<FighterKnockbackState>()
.rollback_component_with_clone::<baked_animation::FighterBoneMatrices>()
.checksum_component_with_hash::<baked_animation::FighterBoneMatrices>()
// Debug views.