Add ordering to navigation-related systems.
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
8148aa4092
commit
1f3aa8eaa0
|
@ -270,7 +270,7 @@ fn add_speed(mut commands: Commands, query: Query<Entity, (Added<Speed>, Without
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn limit_speed(mut query: Query<(&mut Speed, &MaxSpeed)>) {
|
pub(crate) fn limit_speed(mut query: Query<(&mut Speed, &MaxSpeed)>) {
|
||||||
for (mut speed, max_speed) in &mut query {
|
for (mut speed, max_speed) in &mut query {
|
||||||
if **speed > **max_speed {
|
if **speed > **max_speed {
|
||||||
**speed = **max_speed;
|
**speed = **max_speed;
|
||||||
|
@ -391,7 +391,11 @@ where
|
||||||
.add_system_to_stage(CoreStage::PostUpdate, log_area_descriptions::<S, A>);
|
.add_system_to_stage(CoreStage::PostUpdate, log_area_descriptions::<S, A>);
|
||||||
const MOVEMENT_CONTROLS: &str = "MOVEMENT_CONTROLS";
|
const MOVEMENT_CONTROLS: &str = "MOVEMENT_CONTROLS";
|
||||||
if config.movement_control_states.is_empty() {
|
if config.movement_control_states.is_empty() {
|
||||||
app.add_system(movement_controls::<S>.label(MOVEMENT_CONTROLS))
|
app.add_system(
|
||||||
|
movement_controls::<S>
|
||||||
|
.label(MOVEMENT_CONTROLS)
|
||||||
|
.after(limit_speed),
|
||||||
|
)
|
||||||
.add_system(snap.chain(error_handler).before(MOVEMENT_CONTROLS));
|
.add_system(snap.chain(error_handler).before(MOVEMENT_CONTROLS));
|
||||||
} else {
|
} else {
|
||||||
let states = config.movement_control_states;
|
let states = config.movement_control_states;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user