From 6786706e69790e4d0bed2242d124eb6b514ce79e Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Fri, 14 Feb 2025 15:09:08 -0800
Subject: [PATCH] parse css entities only

---
 lib/bsp_loader/src/bsp.rs | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/lib/bsp_loader/src/bsp.rs b/lib/bsp_loader/src/bsp.rs
index a083a78..0f08660 100644
--- a/lib/bsp_loader/src/bsp.rs
+++ b/lib/bsp_loader/src/bsp.rs
@@ -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()));
 			},