From 6ee21bc0ea4777c485cad6747f5e9f3f0a2a8180 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Thu, 5 Jan 2023 22:30:49 -0800 Subject: [PATCH] NSEntity: add attribute m_bIsBrush, which will be set if the entity is using a brush model. --- src/shared/NSEntity.h | 1 + src/shared/NSEntity.qc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/shared/NSEntity.h b/src/shared/NSEntity.h index dd467ca2..e7070b5a 100644 --- a/src/shared/NSEntity.h +++ b/src/shared/NSEntity.h @@ -59,6 +59,7 @@ private: vector m_oldAngle; /**< contains the angle that the entity spawned in */ string m_oldModel; /**< contains the model that the entity spawned with */ float m_oldSolid; /**< contains the collision type the entity spawned with */ + bool m_bIsBrush; PREDICTED_VECTOR_N(origin) PREDICTED_VECTOR_N(angles) diff --git a/src/shared/NSEntity.qc b/src/shared/NSEntity.qc index 4e91899a..ab86ae89 100644 --- a/src/shared/NSEntity.qc +++ b/src/shared/NSEntity.qc @@ -446,6 +446,7 @@ void NSEntity::SetOrigin( vector newOrigin ) { } void NSEntity::SetModel( string newModel ) { + m_bIsBrush = substring(newModel, 0, 1) == "*" ? true : false; model = newModel; setmodel( this, newModel ); @@ -458,6 +459,7 @@ void NSEntity::SetModelindex( float newModelIndex ) { modelindex = newModelIndex; SetSize( mins, maxs ); + } void NSEntity::AddEffects( float fl ) {