From fb5775fdcdb27a62976266d4a530e7e82f5d33d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Rom=C3=A0n?= Date: Thu, 27 Aug 2026 18:54:06 +0200 Subject: [PATCH] Improve dash consistency --- src/fighter/state/dash.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/fighter/state/dash.rs b/src/fighter/state/dash.rs index a6b709e..d72e03a 100644 --- a/src/fighter/state/dash.rs +++ b/src/fighter/state/dash.rs @@ -70,7 +70,6 @@ impl FighterStateImpl for DashState { fn on_enter(&mut self, state_context: &mut FighterStateContext) { *state_context.facing_direction = self.direction; - state_context.input.clear_buffer(); state_context.velocity.x = state_context.fighter_attribs.dash_initial_velocity * self.direction.to_sign(); @@ -80,7 +79,15 @@ impl FighterStateImpl for DashState { Duration::ZERO, ); - state_context.input.clear_buffer(); + match state_context.facing_direction { + FighterFacingDirection::Left => { + state_context.input.clear_command(crate::input::FighterCommands::SmashMoveLeft); + }, + FighterFacingDirection::Right => { + state_context.input.clear_command(crate::input::FighterCommands::SmashMoveRight); + }, + } + } fn update(&mut self, state_context: &mut FighterStateContext) {