diff --git a/strafe-client/src/physics.rs b/strafe-client/src/physics.rs index 520841f..c43cf6c 100644 --- a/strafe-client/src/physics.rs +++ b/strafe-client/src/physics.rs @@ -79,10 +79,15 @@ pub struct InputState{ } impl InputState{ fn set_next_mouse(&mut self,next_mouse:MouseState){ + // would this be correct? + // if self.next_mouse.time==next_mouse.time{ + // self.next_mouse=next_mouse; + // }else{ //I like your functions magic language self.mouse=std::mem::replace(&mut self.next_mouse,next_mouse); //equivalently: //(self.next_mouse,self.mouse)=(next_mouse,self.next_mouse.clone()); + // } } fn replace_mouse(&mut self,mouse:MouseState,next_mouse:MouseState){ (self.next_mouse,self.mouse)=(next_mouse,mouse);