diff --git a/strafe-client/src/model_physics.rs b/strafe-client/src/model_physics.rs index 9aa0d71..7601058 100644 --- a/strafe-client/src/model_physics.rs +++ b/strafe-client/src/model_physics.rs @@ -720,7 +720,7 @@ impl MinkowskiMesh<'_>{ // Most of the calculation time is just calculating the starting point // for the "actual" crawling algorithm below (predict_collision_{in|out}). fn closest_fev_not_inside(&self,mut infinity_body:Body,start_time:Time)->Option>{ - infinity_body.infinity_dir().map_or(None,|dir|{ + infinity_body.infinity_dir().and_then(|dir|{ let infinity_fev=self.infinity_fev(-dir,infinity_body.position); //a line is simpler to solve than a parabola infinity_body.velocity=dir; @@ -731,7 +731,7 @@ impl MinkowskiMesh<'_>{ }) } pub fn predict_collision_in(&self,relative_body:&Body,Range{start:start_time,end:time_limit}:Range