Spread state context architecture (Fixes #18) (#30)
CI / build-and-test (push) Canceled after 0s

Reviewed-on: #30
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #30.
This commit is contained in:
2026-09-15 17:59:03 +00:00
committed by EIREXE
parent 43a04e9491
commit b8b65e60e9
15 changed files with 384 additions and 302 deletions
+6 -6
View File
@@ -3,7 +3,7 @@
//! bit-for-bit deterministic for rollback.
use crate::fighter::state::{
FighterState, FighterStateContext, dash, ground_attack, turn, wait, walk,
CollisionContext, FighterState, InterruptContext, dash, ground_attack, turn, wait, walk,
};
use crate::fighter::{
FighterAttributes, FighterPreviousTranslation, FighterTranslation, FighterVelocity,
@@ -164,13 +164,13 @@ pub fn apply_grounded_motion(
}
pub fn collide_with_stage_grounded(
state_context: &mut FighterStateContext,
state_context: &mut CollisionContext,
ground_common: &mut GroundedStateCommon,
can_walk_off: bool,
) -> GroundedMotionResult {
let translation = &mut state_context.translation;
let ecb = &state_context.ecb;
let stage_collision = &state_context.stage_collision;
let ecb = state_context.ecb;
let stage_collision = state_context.stage_collision;
let stage_poly = stage_collision
.stage_polys
@@ -322,14 +322,14 @@ mod tests {
}
pub fn grounded_movement_common_interrupts(
state_context: &FighterStateContext,
state_context: &InterruptContext,
ground_common: &GroundedStateCommon,
) -> Option<FighterState> {
super::jump::check_input(state_context, ground_common)
}
pub fn grounded_movement_standstill_common_interrupts(
state_context: &FighterStateContext,
state_context: &InterruptContext,
ground_common: &GroundedStateCommon,
) -> Option<FighterState> {
if let Some(state) = ground_attack::check_interrupt(state_context, &ground_common) {