Skip to content

Commit 2936e7d

Browse files
committed
Add particle effect for Devastator's locked-fire mode
Currently it's the same as Heavy Rifle's one. But can be changed in future.
1 parent 6d2baa4 commit 2936e7d

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/game/shared/swarm/asw_weapon_devastator_shared.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,24 @@ void CASW_Weapon_Devastator::DisableLockFire()
270270
WeaponSound( BURST );
271271
}
272272
}
273+
274+
#ifdef CLIENT_DLL
275+
void CASW_Weapon_Devastator::ClientThink()
276+
{
277+
BaseClass::ClientThink();
278+
279+
if ( m_bLockedFire != m_hLockedFireParticle.IsValid() )
280+
{
281+
if ( m_bLockedFire )
282+
{
283+
m_hLockedFireParticle.Set( ParticleProp()->Create( "buffgrenade_attach_arc", PATTACH_POINT_FOLLOW, "eject1" ) );
284+
ParticleProp()->AddControlPoint( m_hLockedFireParticle, 1, this, PATTACH_POINT_FOLLOW, "muzzle" );
285+
}
286+
else
287+
{
288+
ParticleProp()->StopEmissionAndDestroyImmediately( m_hLockedFireParticle.GetObject() );
289+
m_hLockedFireParticle.Set( NULL );
290+
}
291+
}
292+
}
293+
#endif

src/game/shared/swarm/asw_weapon_devastator_shared.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class CASW_Weapon_Devastator : public CASW_Weapon_Assault_Shotgun
3939
#else
4040
virtual const char *GetPartialReloadSound( int iPart );
4141
virtual bool HasSecondaryExplosive(void) const { return false; }
42+
virtual void ClientThink() override;
43+
4244
#endif
4345
virtual const char *GetMagazineGibModelName() const override { return "models/weapons/empty_clips/devastator_empty_clip.mdl"; }
4446
virtual bool HasSecondaryAttack() override;
@@ -48,6 +50,10 @@ class CASW_Weapon_Devastator : public CASW_Weapon_Assault_Shotgun
4850
protected:
4951
CNetworkVar( bool, m_bLockedFire );
5052

53+
#ifdef CLIENT_DLL
54+
HPARTICLEFFECT m_hFastFireParticle;
55+
#endif
56+
5157
void DisableLockFire();
5258
};
5359

0 commit comments

Comments
 (0)