Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
cBournhonesque committed Mar 3, 2025
1 parent 7d9e904 commit e336158
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/fps/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn player_movement(
>,
) {
for (transform, action_state, player_id) in player_query.iter_mut() {
info!(tick = ?tick_manager.tick(), action = ?action_state.dual_axis_data(&PlayerActions::MoveCursor), "Data in Movement (FixedUpdate)");
trace!(tick = ?tick_manager.tick(), action = ?action_state.dual_axis_data(&PlayerActions::MoveCursor), "Data in Movement (FixedUpdate)");
shared_player_movement(transform, action_state);
// info!(tick = ?tick_manager.tick(), ?transform, actions = ?action_state.get_pressed(), "applying movement to predicted player");
}
Expand Down
2 changes: 1 addition & 1 deletion examples/spaceships/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fn player_movement(

for (action_state, input_buffer, mut aiq) in q.iter_mut() {
if !action_state.get_pressed().is_empty() {
error!(
trace!(
"🎹 {:?} {tick:?} = {:?}",
aiq.player.client_id,
action_state.get_pressed(),
Expand Down
2 changes: 1 addition & 1 deletion examples/spaceships/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ pub(crate) fn player_movement(
let tick = tick_manager.tick();
for (action_state, mut aiq) in q.iter_mut() {
if !action_state.get_pressed().is_empty() {
error!(
trace!(
"🎹 {:?} {tick:?} = {:?}",
aiq.player.client_id,
action_state.get_pressed(),
Expand Down
7 changes: 7 additions & 0 deletions lightyear/src/client/input/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
//! You can then add the input type by adding the [`InputPlugin<InputType>`](crate::prelude::InputPlugin) to your app.
//!
//! ```rust
//! use bevy::ecs::entity::MapEntities;
//! use bevy::prelude::*;
//! use lightyear::prelude::client::*;
//! use lightyear::prelude::*;
Expand All @@ -28,6 +29,12 @@
//! None,
//! }
//!
//! // every input must implement MapEntities
//! impl MapEntities for MyInput {
//! fn map_entities<M: EntityMapper>(&mut self, entity_mapper: &mut M) {
//! }
//! }
//!
//! let mut app = App::new();
//! # app.add_plugins(ClientPlugins::new(ClientConfig::default()));
//! app.add_plugins(InputPlugin::<MyInput>::default());
Expand Down
2 changes: 1 addition & 1 deletion lightyear/src/server/input/leafwing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn receive_input_message<A: LeafwingUserAction>(

if let Ok(buffer) = query.get_mut(entity) {
if let Some(mut buffer) = buffer {
error!(
trace!(
"Update InputBuffer: {} using InputMessage: {}",
buffer.as_ref(),
message
Expand Down

0 comments on commit e336158

Please sign in to comment.