Improve ECB behaviour, add ECB interpolation, wall/ceiling support etc
CI / build-and-test (pull_request) Successful in 1m42s
CI / production-build (pull_request) Successful in 10m56s

This commit is contained in:
2026-10-13 19:35:44 +02:00
parent f1da5c1172
commit a18acb6775
7 changed files with 874 additions and 163 deletions
+20 -4
View File
@@ -1,12 +1,25 @@
use bevy::prelude::*;
use crate::{
camera::MatchCamera, fighter::{
FighterECB, FighterFacingDirection, FighterHitboxes, FighterHitstop, FighterHitstopShake, FighterInvulnerabilityState, FighterLedgeInformation, FighterPendingRespawn, FighterPreviousFacingDirection, FighterPreviousTranslation, FighterSurfaceState, FighterTranslation, FighterVelocity, animation::FighterAnimationFrame, attack::{
camera::MatchCamera,
fighter::{
FighterECB, FighterFacingDirection, FighterHitboxes, FighterHitstop, FighterHitstopShake,
FighterInvulnerabilityState, FighterLedgeInformation, FighterPendingRespawn,
FighterPreviousFacingDirection, FighterPreviousTranslation, FighterSurfaceState,
FighterTranslation, FighterVelocity,
animation::FighterAnimationFrame,
attack::{
FighterDamage, FighterKnockbackVelocity, FighterPendingHitReaction, FighterPendingHits,
FighterSolvedHurtboxes, FighterStaleMoveQueue,
}, baked_animation::FighterBoneMatrices, state::FighterState,
}, input::FighterInput, match_runtime::MatchState, player::Player, stage::line::StageCollision,
},
baked_animation::FighterBoneMatrices,
ecb::FighterDesiredECB,
state::FighterState,
},
input::FighterInput,
match_runtime::MatchState,
player::Player,
stage::line::StageCollision,
};
#[derive(Resource, Default)]
@@ -27,6 +40,7 @@ struct FighterCheckpoint {
entity: Entity,
handle: usize,
ecb: FighterECB,
desired_ecb: FighterDesiredECB,
previous_ecb: crate::fighter::ecb::FighterPreviousECB,
velocity: FighterVelocity,
translation: FighterTranslation,
@@ -131,6 +145,7 @@ pub(super) fn save_or_restore(world: &mut World) {
let mut entity = world.entity_mut(saved.entity);
entity.insert(saved.ecb);
entity.insert(saved.desired_ecb);
entity.insert(saved.previous_ecb);
entity.insert(saved.velocity);
entity.insert(saved.translation);
@@ -169,6 +184,7 @@ fn capture_fighter(world: &World, entity: Entity) -> Option<FighterCheckpoint> {
entity,
handle: fighter.get::<Player>()?.handle,
ecb: *fighter.get::<FighterECB>()?,
desired_ecb: *fighter.get::<FighterDesiredECB>()?,
previous_ecb: *fighter.get::<crate::fighter::ecb::FighterPreviousECB>()?,
velocity: *fighter.get::<FighterVelocity>()?,
translation: *fighter.get::<FighterTranslation>()?,