diff --git a/common/src/msg/client.rs b/common/src/msg/client.rs index ff2856bc81..b4022483ad 100644 --- a/common/src/msg/client.rs +++ b/common/src/msg/client.rs @@ -14,7 +14,7 @@ pub enum ClientMsg { }, /// Request `ClientState::Registered` from an ingame state ExitIngame, - /// Request `ClientState::Specator` from a registered or ingame state + /// Request `ClientState::Spectator` from a registered or ingame state Spectate, ControllerInputs(comp::ControllerInputs), ControlEvent(comp::ControlEvent), diff --git a/common/src/sys/controller.rs b/common/src/sys/controller.rs index ddc8ad08f8..f68839f571 100644 --- a/common/src/sys/controller.rs +++ b/common/src/sys/controller.rs @@ -341,7 +341,11 @@ impl<'a> System<'a> for Sys { ControlEvent::Unmount => server_emitter.emit(ServerEvent::Unmount(entity)), ControlEvent::InventoryManip(manip) => { server_emitter.emit(ServerEvent::InventoryManip(entity, manip)) - } //ControlEvent::Respawn => server_emitter.emit(ServerEvent::Unmount(entity)), + } /*ControlEvent::Respawn => { + if state.is_dead { + server_emitter.emit(ServerEvent::Respawn(entity)), + } + }*/ } } @@ -422,7 +426,6 @@ impl<'a> System<'a> for Sys { && can_climb(body), physics.on_wall, ) { - println!("here 1"); character.movement = Climb; continue; } @@ -553,7 +556,6 @@ impl<'a> System<'a> for Sys { && can_climb(body), physics.on_wall, ) { - println!("here 2"); character.movement = Climb; continue; } @@ -671,7 +673,6 @@ impl<'a> System<'a> for Sys { if !inputs.glide.is_pressed() { character.movement = Fall; } else if let (Some(_wall_dir), true) = (physics.on_wall, can_climb(body)) { - println!("here 3"); character.movement = Climb; } diff --git a/common/src/sys/mount.rs b/common/src/sys/mount.rs index acb0e65b5e..4a8b2ca7bf 100644 --- a/common/src/sys/mount.rs +++ b/common/src/sys/mount.rs @@ -59,13 +59,12 @@ impl<'a> System<'a> for Sys { let _ = orientations.insert(mounter, ori); let _ = velocities.insert(mounter, vel); } - let _ = controllers.insert( - entity, - Controller { + controllers.get_mut(entity).map(|controller| { + *controller = Controller { inputs, ..Default::default() - }, - ); + } + }); } else { *(mount_states.get_mut_unchecked()) = MountState::Unmounted; } diff --git a/server/src/lib.rs b/server/src/lib.rs index d6d1ba9948..2a5147ad1f 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -755,7 +755,7 @@ impl Server { } ServerEvent::ExitIngame { entity } => { - // Create new entity with just `Clienti`, `Uid`, and `Player` components + // Create new entity with just `Client`, `Uid`, and `Player` components // Easier than checking and removing all other known components // Note: If other `ServerEvent`s are referring to this entity they will be // disrupted