lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
Showing only changes of commit 168d6708d1 - Show all commits

View File

@ -39,9 +39,6 @@ pub struct InputState{
controls:strafesnet_common::controls_bitflag::Controls, controls:strafesnet_common::controls_bitflag::Controls,
} }
impl InputState{ impl InputState{
pub const fn get_next_mouse(&self)->&MouseState{
&self.next_mouse
}
fn set_next_mouse(&mut self,next_mouse:MouseState){ fn set_next_mouse(&mut self,next_mouse:MouseState){
//I like your functions magic language //I like your functions magic language
self.mouse=std::mem::replace(&mut self.next_mouse,next_mouse); self.mouse=std::mem::replace(&mut self.next_mouse,next_mouse);
@ -693,18 +690,18 @@ struct IntersectModel{
} }
#[derive(Debug,Clone,Copy,Eq,Hash,PartialEq)] #[derive(Debug,Clone,Copy,Eq,Hash,PartialEq)]
struct ContactCollision{ pub struct ContactCollision{
face_id:model_physics::MinkowskiFace, face_id:model_physics::MinkowskiFace,
model_id:ContactModelId, model_id:ContactModelId,
submesh_id:PhysicsSubmeshId, submesh_id:PhysicsSubmeshId,
} }
#[derive(Debug,Clone,Copy,Eq,Hash,PartialEq)] #[derive(Debug,Clone,Copy,Eq,Hash,PartialEq)]
struct IntersectCollision{ pub struct IntersectCollision{
model_id:IntersectModelId, model_id:IntersectModelId,
submesh_id:PhysicsSubmeshId, submesh_id:PhysicsSubmeshId,
} }
#[derive(Debug,Clone,Eq,Hash,PartialEq)] #[derive(Debug,Clone,Eq,Hash,PartialEq)]
enum Collision{ pub enum Collision{
Contact(ContactCollision), Contact(ContactCollision),
Intersect(IntersectCollision), Intersect(IntersectCollision),
} }
@ -957,9 +954,6 @@ impl PhysicsContext{
pub const fn camera(&self)->PhysicsCamera{ pub const fn camera(&self)->PhysicsCamera{
self.state.camera 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 /// use with caution, this is the only non-instruction way to mess with physics
pub fn generate_models(&mut self,map:&map::CompleteMap){ pub fn generate_models(&mut self,map:&map::CompleteMap){
self.state.clear(); self.state.clear();