NSEntity: add attribute m_bIsBrush, which will be set if the entity is using a brush model.

This commit is contained in:
Marco Cawthorne 2023-01-05 22:30:49 -08:00
parent dbf511dfb9
commit 6ee21bc0ea
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
2 changed files with 3 additions and 0 deletions

View File

@ -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)

View File

@ -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 ) {