Skip to content

Commit

Permalink
Fix ground recovery using the wrong clock
Browse files Browse the repository at this point in the history
  • Loading branch information
haihala committed Dec 24, 2024
1 parent c3aa7d6 commit 4e7b38a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/lib/src/movement/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ pub use player_velocity::PlayerVelocity;
use bevy::prelude::*;

use foundation::{
Area, CharacterFacing, Clock, Combo, Player, Players, RollbackSchedule, Stats, StatusFlag,
SystemStep, FPS,
Area, CharacterClock, CharacterFacing, Clock, Combo, Player, Players, RollbackSchedule, Stats,
StatusFlag, SystemStep, FPS,
};
use player_state::PlayerState;

Expand Down Expand Up @@ -180,16 +180,16 @@ fn set_target_position(mut query: Query<(&Transform, &PlayerState, &mut PlayerVe

#[allow(clippy::type_complexity)]
fn resolve_floor(
clock: Res<Clock>,
mut players: Query<(
&mut PlayerVelocity,
&mut PlayerState,
&mut HitboxSpawner,
&mut Transform,
&Pushbox,
&CharacterClock,
)>,
) {
for (mut velocity, mut state, mut spawner, tf, pushbox) in &mut players {
for (mut velocity, mut state, mut spawner, tf, pushbox, clock) in &mut players {
let on_floor =
pushbox.with_center(tf.translation.truncate()).bottom() <= GROUND_PLANE_HEIGHT;

Expand Down

0 comments on commit 4e7b38a

Please sign in to comment.