This commit is contained in:
Quaternions 2023-10-31 21:42:42 -07:00
parent 5f1b93d9c4
commit 5e28c02640
2 changed files with 4 additions and 0 deletions

View File

@ -237,6 +237,7 @@ impl IntersectingAttributes{
}
}
//Spawn(u32) NO! spawns are indexed in the map header instead of marked with attibutes
//TODO: deduplicate attributes
pub enum CollisionAttributes{
Decoration,//visual only
Contact{//track whether you are contacting the object

View File

@ -156,6 +156,7 @@ impl Default for Modes{
#[derive(Default)]
struct PhysicsModels{
//TODO: put meshes, attributes in here, indexed!
models:Vec<PhysicsModel>,
model_id_from_wormhole_id:std::collections::HashMap::<u32,usize>,
}
@ -164,6 +165,8 @@ impl PhysicsModels{
self.models.clear();
self.model_id_from_wormhole_id.clear();
}
//TODO: "statically" verify the maps don't refer to any nonexistant data, if they do delete the references.
//then I can make these getter functions unchecked.
fn get(&self,model_id:usize)->Option<&PhysicsModel>{
self.models.get(model_id)
}