Improve ECB behaviour, add ECB interpolation, wall/ceiling support etc
This commit is contained in:
@@ -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>()?,
|
||||
|
||||
Reference in New Issue
Block a user