Client/Server Feature Split (#63)
This commit is contained in:
@@ -4,7 +4,6 @@ use crate::{
|
||||
animation::AnimationFlags,
|
||||
control::{controller_common::MovementSpeedFactor, controls::ControllerSettings},
|
||||
player::PlayerBodyMesh,
|
||||
utils::commands::IsServer,
|
||||
};
|
||||
use bevy::prelude::*;
|
||||
use happy_feet::prelude::{Grounding, KinematicVelocity, MoveInput};
|
||||
@@ -50,7 +49,6 @@ fn apply_controls(
|
||||
&ActionState<ControlState>,
|
||||
)>,
|
||||
rig_transform_q: Option<Single<&GlobalTransform, With<PlayerBodyMesh>>>,
|
||||
is_server: Option<Res<IsServer>>,
|
||||
) {
|
||||
let Ok((
|
||||
mut move_input,
|
||||
@@ -80,7 +78,7 @@ fn apply_controls(
|
||||
move_input.set(direction * move_factor.0);
|
||||
|
||||
if controls.jump && grounding.is_grounded() {
|
||||
if is_server.is_some() {
|
||||
if cfg!(feature = "server") {
|
||||
flags.jumping = true;
|
||||
flags.jump_count += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user