From 168d6708d161669938d4c9b27c6915617b5414e0 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 15 Jan 2025 01:34:10 -0800 Subject: [PATCH] fix some physics lints --- strafe-client/src/physics.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/strafe-client/src/physics.rs b/strafe-client/src/physics.rs index 9d309b1..a78778c 100644 --- a/strafe-client/src/physics.rs +++ b/strafe-client/src/physics.rs @@ -39,9 +39,6 @@ pub struct InputState{ controls:strafesnet_common::controls_bitflag::Controls, } impl InputState{ - pub const fn get_next_mouse(&self)->&MouseState{ - &self.next_mouse - } fn set_next_mouse(&mut self,next_mouse:MouseState){ //I like your functions magic language self.mouse=std::mem::replace(&mut self.next_mouse,next_mouse); @@ -693,18 +690,18 @@ struct IntersectModel{ } #[derive(Debug,Clone,Copy,Eq,Hash,PartialEq)] -struct ContactCollision{ +pub struct ContactCollision{ face_id:model_physics::MinkowskiFace, model_id:ContactModelId, submesh_id:PhysicsSubmeshId, } #[derive(Debug,Clone,Copy,Eq,Hash,PartialEq)] -struct IntersectCollision{ +pub struct IntersectCollision{ model_id:IntersectModelId, submesh_id:PhysicsSubmeshId, } #[derive(Debug,Clone,Eq,Hash,PartialEq)] -enum Collision{ +pub enum Collision{ Contact(ContactCollision), Intersect(IntersectCollision), } @@ -957,9 +954,6 @@ impl PhysicsContext{ pub const fn camera(&self)->PhysicsCamera{ self.state.camera } - pub const fn get_next_mouse(&self)->&MouseState{ - self.state.input_state.get_next_mouse() - } /// use with caution, this is the only non-instruction way to mess with physics pub fn generate_models(&mut self,map:&map::CompleteMap){ self.state.clear();