From 448b3538448fdd9613e59bd1eb5e3e5088ae4448 Mon Sep 17 00:00:00 2001 From: SanyaSho Date: Thu, 4 Aug 2022 17:01:54 +0300 Subject: [PATCH] game: grenade trail fix --- game/server/hl2/grenade_frag.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/game/server/hl2/grenade_frag.cpp b/game/server/hl2/grenade_frag.cpp index 1788d1919c..f3232798e5 100644 --- a/game/server/hl2/grenade_frag.cpp +++ b/game/server/hl2/grenade_frag.cpp @@ -155,9 +155,10 @@ void CGrenadeFrag::OnRestore( void ) void CGrenadeFrag::CreateEffects( void ) { // Start up the eye glow - m_pMainGlow = CSprite::SpriteCreate( "sprites/redglow1.vmt", GetLocalOrigin(), false ); + if( !m_pMainGlow ) + m_pMainGlow = CSprite::SpriteCreate( "sprites/redglow1.vmt", GetLocalOrigin(), false ); - int nAttachment = LookupAttachment( "fuse" ); + int nAttachment = LookupAttachment( "fuse" ); if ( m_pMainGlow != NULL ) { @@ -169,7 +170,8 @@ void CGrenadeFrag::CreateEffects( void ) } // Start up the eye trail - m_pGlowTrail = CSpriteTrail::SpriteTrailCreate( "sprites/bluelaser1.vmt", GetLocalOrigin(), false ); + if( !m_pGlowTrail ) + m_pGlowTrail = CSpriteTrail::SpriteTrailCreate( "sprites/bluelaser1.vmt", GetLocalOrigin(), false ); if ( m_pGlowTrail != NULL ) { @@ -450,4 +452,4 @@ bool Fraggrenade_WasCreatedByCombine( const CBaseEntity *pEntity ) } return false; -} \ No newline at end of file +}