Allow airborne fighters to pass through platforms while holding down (#65)
## Summary - Ignore soft-platform collision while an airborne fighter holds down. - Preserve existing momentum and collision with solid floors. - Add regression coverage for soft and solid platform behavior. Reviewed-on: #65 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #65.
This commit is contained in:
@@ -248,6 +248,7 @@ mod tests {
|
||||
use crate::fighter::ecb::FighterPreviousECB;
|
||||
use crate::fighter::{FighterECB, FighterSurfaceState};
|
||||
use crate::stage::line::StagePolyType;
|
||||
use crate::input::FighterInput;
|
||||
|
||||
fn two_segment_floor() -> StagePoly {
|
||||
StagePoly::build(
|
||||
@@ -378,12 +379,14 @@ mod tests {
|
||||
let mut context = CollisionContext {
|
||||
translation: &mut translation,
|
||||
prev_translation: &previous_translation,
|
||||
input: &FighterInput::default(),
|
||||
velocity: &mut velocity,
|
||||
surface: &mut surface,
|
||||
ecb: &mut ecb,
|
||||
prev_ecb: &previous_ecb,
|
||||
stage_collision: &stage_collision,
|
||||
leave_ground_ecb_lock_duration: 10,
|
||||
downward_stick_threshold: FGi32::ONE,
|
||||
};
|
||||
|
||||
assert!(matches!(
|
||||
@@ -429,12 +432,14 @@ mod tests {
|
||||
let mut context = CollisionContext {
|
||||
translation: &mut translation,
|
||||
prev_translation: &previous_translation,
|
||||
input: &FighterInput::default(),
|
||||
velocity: &mut velocity,
|
||||
surface: &mut surface,
|
||||
ecb: &mut ecb,
|
||||
prev_ecb: &previous_ecb,
|
||||
stage_collision: &stage_collision,
|
||||
leave_ground_ecb_lock_duration: 10,
|
||||
downward_stick_threshold: FGi32::ONE,
|
||||
};
|
||||
|
||||
assert!(matches!(
|
||||
|
||||
Reference in New Issue
Block a user