lol idk #1

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

View File

@ -235,11 +235,11 @@ impl PhysicsModels{
}
fn get_model_transform(&self,model_id:ModelId)->Option<&PhysicsMeshTransform>{
//ModelId can possibly be a decoration
self.contact_models.get(&ContactModelId::new(model_id.get())).map_or_else(
||self.intersect_models.get(&IntersectModelId::new(model_id.get()))
match self.contact_models.get(&ContactModelId::new(model_id.get())){
Some(model)=>Some(&model.transform),
None=>self.intersect_models.get(&IntersectModelId::new(model_id.get()))
.map(|model|&model.transform),
|model|Some(&model.transform)
)
}
}
fn contact_model(&self,model_id:ContactModelId)->&ContactModel{
&self.contact_models[&model_id]