Client/Server Feature Split (#63)

This commit is contained in:
PROMETHIA-27
2025-09-26 21:59:08 -04:00
committed by GitHub
parent 7f6c00b5d6
commit 2f5d154d26
30 changed files with 674 additions and 271 deletions

View File

@@ -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;
}