diff --git a/src/game/client/c_baseentity.h b/src/game/client/c_baseentity.h index 8ca3e375e99..b0b8e4acf6d 100644 --- a/src/game/client/c_baseentity.h +++ b/src/game/client/c_baseentity.h @@ -1449,6 +1449,10 @@ class C_BaseEntity : public IClientEntity void TrackAngRotation( bool bTrack ); +#ifdef GLOWS_ENABLE + virtual bool CanGlow() const { return true; } +#endif // GLOWS_ENABLE + private: friend void OnRenderStart(); diff --git a/src/game/client/glow_outline_effect.cpp b/src/game/client/glow_outline_effect.cpp index ef776409bc2..d72c2c30461 100644 --- a/src/game/client/glow_outline_effect.cpp +++ b/src/game/client/glow_outline_effect.cpp @@ -319,7 +319,7 @@ void CGlowObjectManager::GlowObjectDefinition_t::DrawModel() while ( pAttachment != NULL ) { - if ( !g_GlowObjectManager.HasGlowEffect( pAttachment ) && pAttachment->ShouldDraw() ) + if ( !g_GlowObjectManager.HasGlowEffect( pAttachment ) && pAttachment->ShouldDraw() && pAttachment->CanGlow() ) { pAttachment->DrawModel( STUDIO_RENDER ); } diff --git a/src/game/client/glow_outline_effect.h b/src/game/client/glow_outline_effect.h index a534fd75508..31a6c0a9802 100644 --- a/src/game/client/glow_outline_effect.h +++ b/src/game/client/glow_outline_effect.h @@ -128,6 +128,7 @@ class CGlowObjectManager ( m_nSplitScreenSlot == GLOW_FOR_ALL_SPLIT_SCREEN_SLOTS || m_nSplitScreenSlot == nSlot ) && ( m_bRenderWhenOccluded || m_bRenderWhenUnoccluded ) && m_hEntity->ShouldDraw() && + m_hEntity->CanGlow() && !m_hEntity->IsDormant(); } diff --git a/src/game/client/tf/c_obj_sentrygun.h b/src/game/client/tf/c_obj_sentrygun.h index 387ae4050b9..d3a99eeb4c1 100644 --- a/src/game/client/tf/c_obj_sentrygun.h +++ b/src/game/client/tf/c_obj_sentrygun.h @@ -38,6 +38,7 @@ class C_SentrygunShield : public C_BaseAnimating static C_SentrygunShield* Create( const char* pszModelName ); virtual void ClientThink(); + virtual bool CanGlow() const OVERRIDE { return false; } void StartFadeOut( float flDuration );