diff --git a/lib/bsp_loader/src/bsp.rs b/lib/bsp_loader/src/bsp.rs index 4c966e7..38fb404 100644 --- a/lib/bsp_loader/src/bsp.rs +++ b/lib/bsp_loader/src/bsp.rs @@ -209,6 +209,10 @@ pub fn convert<'a>( color:glam::Vec4::W, }); + // THE CUBE OF DESTINY + let destination_mesh_id=model::MeshId::new(world_meshes.len() as u32); + world_meshes.push(crate::brush::unit_cube()); + const WHITE:vbsp::Color=vbsp::Color{r:255,g:255,b:255}; const ENTITY_ATTRIBUTE:gameplay_attributes::CollisionAttributesId=ATTRIBUTE_DECORATION; const ENTITY_TRIGGER_ATTRIBUTE:gameplay_attributes::CollisionAttributesId=ATTRIBUTE_INTERSECT_DEFAULT; @@ -454,13 +458,10 @@ pub fn convert<'a>( let mut modes_list=Vec::new(); if let Some(spawn_point)=found_spawn{ - // create a new mesh - let mesh_id=model::MeshId::new(world_meshes.len() as u32); - world_meshes.push(crate::brush::unit_cube()); // create a new model let model_id=model::ModelId::new(world_models.len() as u32); world_models.push(model::Model{ - mesh:mesh_id, + mesh:destination_mesh_id, attributes:ATTRIBUTE_INTERSECT_DEFAULT, transform:integer::Planar64Affine3::from_translation(valve_transform(spawn_point.into())), color:glam::Vec4::W,