Skip to content

Commit d84f5fd

Browse files
committed
Fixed the issue with stunstick
1 parent 6cc2937 commit d84f5fd

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

sp/src/game/shared/hl2mp/weapon_stunstick.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,30 @@ void CWeaponStunStick::SetStunState( bool state )
397397
{
398398
m_bActive = state;
399399

400+
#ifdef MAPBASE
401+
402+
#ifdef CLIENT_DLL
403+
if ( m_bActive )
404+
{
405+
Vector vecAttachment;
406+
QAngle vecAttachmentAngles;
407+
408+
GetAttachment( 1, vecAttachment, vecAttachmentAngles );
409+
g_pEffects->Sparks( vecAttachment );
410+
411+
}
412+
#else
413+
if ( m_bActive )
414+
{
415+
EmitSound( "Weapon_StunStick.Activate" );
416+
}
417+
else
418+
{
419+
EmitSound( "Weapon_StunStick.Deactivate" );
420+
}
421+
#endif
422+
423+
#else
400424
if ( m_bActive )
401425
{
402426
//FIXME: START - Move to client-side
@@ -415,6 +439,7 @@ void CWeaponStunStick::SetStunState( bool state )
415439
{
416440
EmitSound( "Weapon_StunStick.Deactivate" );
417441
}
442+
#endif
418443
}
419444

420445
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)