Initial work on ledge & improved baking of root motion. (#90)
CI / build-and-test (push) Successful in 2m15s
CI / production-build (push) Successful in 12m24s

Reviewed-on: #90
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #90.
This commit is contained in:
2026-10-12 20:58:27 +00:00
committed by EIREXE
parent 0642a9234b
commit 9b974d0dd6
22 changed files with 1094 additions and 141 deletions
+3 -23
View File
@@ -2,9 +2,9 @@
use crate::{
fighter::{
animation::AnimKind, state::{
CollisionContext, EnterContext, FighterState, FighterStateImpl, InterruptContext, UpdateContext, air::{self, AirborneStateCommon}, air_dodge::AirDodgeState, ground, ground_attack,
CollisionContext, EnterContext, FighterState, FighterStateImpl, InterruptContext, UpdateContext, air::{self, AirborneStateCommon}, ground::{self}, ground_attack,
},
}, input::{DigitalAction, FighterCommands}, math::{int::FGi32, vec::FGVec2},
}, input::{DigitalAction, FighterCommands},
};
#[derive(Debug, Hash, Clone, Copy)]
pub enum JumpType {
@@ -50,27 +50,7 @@ impl FighterStateImpl for JumpSquatState {
}
// Special handling for wavedash from jump squat
if state_context.input.has_command(FighterCommands::Shield) {
// If aiming sideways and in the deadzone, do a perfect wavedash
// TODO: Improve this so we don't have to go through the airborne state first
let mut wavedash_dir = state_context
.input
.get_last_frame()
.movement
.normalize_or_zero();
let movement = state_context.input.get_last_frame().movement;
if movement.y.is_zero() && !movement.x.is_zero() {
wavedash_dir.y =
-state_context.game_settings.input_common.stick_deadzone - FGi32::lit("-0.01");
wavedash_dir.x = movement.x.signum();
}
if wavedash_dir == FGVec2::ZERO {
wavedash_dir = FGVec2::lit("0.0", "-1.0");
}
Some(FighterState::AirDodge(AirDodgeState {
direction: wavedash_dir.normalize_or_zero(),
}))
Some(ground::perform_wavedash(state_context.input, state_context.game_settings))
} else if self.duration_counter >= state_context.fighter_attributes.jumpsquat_duration {
let tap_jump_held = matches!(self.initiator, JumpStateInitiator::Tap)
&& state_context.input.get_last_frame().movement.y