parse css entities only

This commit is contained in:
Quaternions 2025-02-14 15:09:08 -08:00
parent 4d17e50883
commit 6786706e69

@ -136,10 +136,8 @@ pub fn convert<'a>(
for raw_ent in bsp.entities.iter(){
match raw_ent.parse(){
Ok(vbsp::basic::Entity::Brush(brush))
|Ok(vbsp::basic::Entity::BrushIllusionary(brush))
|Ok(vbsp::basic::Entity::BrushWall(brush))
|Ok(vbsp::basic::Entity::BrushWallToggle(brush))=>{
// func_brush
Ok(vbsp::css::Entity::FuncBrush(brush))=>{
//The first character of brush.model is '*'
match brush.model[1..].parse(){
Ok(mesh_id)=>{
@ -150,9 +148,9 @@ pub fn convert<'a>(
valve_transform(brush.origin.into())
),
color:(glam::Vec3::from_array([
brush.color.r as f32,
brush.color.g as f32,
brush.color.b as f32
brush.rendercolor.r as f32,
brush.rendercolor.g as f32,
brush.rendercolor.b as f32
])/255.0).extend(1.0),
});
},
@ -161,10 +159,9 @@ pub fn convert<'a>(
},
}
},
_=>(),
}
match raw_ent.parse(){
// func_illusionary
// func_wall
// func_wall_toggle
Ok(vbsp::css::Entity::InfoPlayerCounterterrorist(spawn))=>{
found_spawn=Some(valve_transform(spawn.origin.into()));
},