Fix various minor issues (#74)
CI / production-build (push) Canceled after 0s
CI / build-and-test (push) Canceled after 29s

Reviewed-on: #74
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #74.
This commit is contained in:
2026-09-28 15:08:39 +00:00
committed by EIREXE
parent e02dff58e5
commit ccf2657d29
10 changed files with 36 additions and 16 deletions
+17 -2
View File
@@ -45,7 +45,7 @@ pub fn air_collide_with_stage(
ecb: &FighterECB,
stage_collision: &StageCollision,
ignored_polys: &[usize],
ignore_soft_platforms: bool,
can_ignore_soft_platforms: bool,
) -> Option<AirCollisionWithStageResult> {
let ray_segment = FGSegment2d::new(
prev_translation.0 + prev_ecb.get_bottom_point(),
@@ -58,7 +58,7 @@ pub fn air_collide_with_stage(
.enumerate()
.filter(|(poly_idx, poly)| {
!ignored_polys.contains(poly_idx)
&& !(ignore_soft_platforms && matches!(poly.poly_type, StagePolyType::Platform))
&& !(can_ignore_soft_platforms && matches!(poly.poly_type, StagePolyType::Platform))
})
.filter_map(|(poly_idx, poly)| {
poly.intersect_ray(ray_segment).map(|intersect_result| {
@@ -176,6 +176,21 @@ mod tests {
true,
)
.is_none());
assert_eq!(
air_collide_with_stage(
&previous_translation,
&translation,
&previous_ecb,
&ecb,
&stage_collision,
&[],
false,
)
.expect("air dodges still collide with soft platforms")
.hit_position,
FGVec2::lit("0", "0")
);
}
#[test]