Compare commits

..
Author SHA1 Message Date
EIREXE 13ee58ce17 Fix Rust cache reuse for dynamic linking
CI / build-and-test (pull_request) Successful in 12m17s
2026-09-17 10:41:57 +02:00
EIREXE ff78847512 Fix run direction not being taken into account when accelerating (Fixes #11) (#35)
CI / build-and-test (push) Successful in 10m58s
Reviewed-on: #35
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
2026-09-16 19:17:40 +00:00
EIREXE ae8f7b5850 Deduplicate fighter state lifecycle policies (#36)
CI / build-and-test (push) Failing after 10m51s
Fixes #22

Extracts shared grounded collision/friction and airborne movement/landing policies while preserving state-specific behavior. Running fighters now pass `can_walk_off = true` so they can run off platform edges. Includes grounded and airborne hitstun call sites.

Reviewed-on: #36
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
2026-09-16 18:30:53 +00:00
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -23,9 +23,9 @@ jobs:
"$HOME/.cargo/bin/rustup" toolchain install nightly-2026-09-14 --profile minimal "$HOME/.cargo/bin/rustup" toolchain install nightly-2026-09-14 --profile minimal
- name: Cache Rust dependencies and build artifacts - name: Cache Rust dependencies and build artifacts
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with: with:
prefix-key: v1-rust prefix-key: v2-rust
shared-key: linux-nightly shared-key: linux-nightly
cache-bin: false cache-bin: false
+2
View File
@@ -150,6 +150,7 @@ pub struct UpdateContext<'a> {
pub fighter_attributes: &'a FighterAttributes, pub fighter_attributes: &'a FighterAttributes,
pub attack_scripts: &'a Assets<FighterAttackScript>, pub attack_scripts: &'a Assets<FighterAttackScript>,
pub attack_script_assets: &'a FighterAttackScriptAssets, pub attack_script_assets: &'a FighterAttackScriptAssets,
pub facing_direction: &'a FighterFacingDirection,
} }
impl UpdateContext<'_> { impl UpdateContext<'_> {
@@ -290,6 +291,7 @@ impl<'w, 's> FighterFrameQueryItem<'w, 's> {
fighter_attributes: attributes, fighter_attributes: attributes,
attack_scripts, attack_scripts,
attack_script_assets, attack_script_assets,
facing_direction: &self.facing_direction
} }
} }
+1 -1
View File
@@ -41,7 +41,7 @@ impl FighterStateImpl for RunState {
let last_frame = state_context.input.get_last_frame(); let last_frame = state_context.input.get_last_frame();
let (accel, target_vel) = state_context let (accel, target_vel) = state_context
.fighter_attributes .fighter_attributes
.get_accel_and_target_dashrun(&last_frame, FGi32::ONE); .get_accel_and_target_dashrun(&last_frame, state_context.facing_direction.to_sign());
let accel = ground::compute_ground_accel( let accel = ground::compute_ground_accel(
accel, accel,
target_vel, target_vel,