diff --git a/strafe-client/src/model_physics.rs b/strafe-client/src/model_physics.rs index be7382e..0e9e500 100644 --- a/strafe-client/src/model_physics.rs +++ b/strafe-client/src/model_physics.rs @@ -1,5 +1,6 @@ use std::borrow::{Borrow,Cow}; use std::collections::{HashSet,HashMap}; +use std::ops::Range; use strafesnet_common::integer::vec3::Vector3; use strafesnet_common::model::{self,MeshId,PolygonIter}; use strafesnet_common::integer::{self,vec3,Fixed,Planar64,Planar64Vec3,Ratio}; @@ -718,7 +719,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>{ + fn closest_fev_not_inside(&self,mut infinity_body:Body,start_time:Time)->Option>{ infinity_body.infinity_dir().map_or(None,|dir|{ let infinity_fev=self.infinity_fev(-dir,infinity_body.position); //a line is simpler to solve than a parabola @@ -729,13 +730,13 @@ impl MinkowskiMesh<'_>{ infinity_fev.crawl(self,&infinity_body,Time::MIN/4,start_time).miss() }) } - pub fn predict_collision_in(&self,relative_body:&Body,start_time:Time,time_limit:Time)->Option<(MinkowskiFace,GigaTime)>{ + pub fn predict_collision_in(&self,relative_body:&Body,Range{start:start_time,end:time_limit}:Range