bsp_loader: they actually use the texture to inform behaviour

This commit is contained in:
Quaternions 2025-02-26 10:16:48 -08:00
parent c6663bdf73
commit 5749d76354

@ -237,6 +237,15 @@ pub fn brush_to_mesh(bsp:&vbsp::Bsp,brush:&vbsp::Brush)->Result<model::Mesh,Brus
let sides_range=brush_start_idx..brush_start_idx+brush.num_brush_sides as usize;
let sides=bsp.brush_sides.get(sides_range).ok_or(BrushToMeshError::SliceBrushSides)?;
let face_list=sides.iter().map(|side|{
// The so-called tumor brushes are actually visleaf hints
// used to inform the bsp of how to paritition space
if let Some(texture_info)=bsp.textures_info.get(side.texture_info as usize){
let texture_info=vbsp::Handle::new(bsp,texture_info);
// I cannot believe they actually use the texture to inform behaviour
if matches!(texture_info.name().to_lowercase().as_str(),"tools/toolshint"|"tools/toolsskip"){
return None;
}
}
let plane=bsp.plane(side.plane as usize)?;
Some(Face{
normal:valve_transform_normal(plane.normal.into()),