From d84f5fdecabfdf3cc84db3cca121ace70186c717 Mon Sep 17 00:00:00 2001 From: Wikot235 <149392035+Wikot235@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:21:15 +0200 Subject: [PATCH] Fixed the issue with stunstick --- sp/src/game/shared/hl2mp/weapon_stunstick.cpp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sp/src/game/shared/hl2mp/weapon_stunstick.cpp b/sp/src/game/shared/hl2mp/weapon_stunstick.cpp index 1d6ae161a0..2e5c82aca4 100644 --- a/sp/src/game/shared/hl2mp/weapon_stunstick.cpp +++ b/sp/src/game/shared/hl2mp/weapon_stunstick.cpp @@ -397,6 +397,30 @@ void CWeaponStunStick::SetStunState( bool state ) { m_bActive = state; +#ifdef MAPBASE + + #ifdef CLIENT_DLL + if ( m_bActive ) + { + Vector vecAttachment; + QAngle vecAttachmentAngles; + + GetAttachment( 1, vecAttachment, vecAttachmentAngles ); + g_pEffects->Sparks( vecAttachment ); + + } + #else + if ( m_bActive ) + { + EmitSound( "Weapon_StunStick.Activate" ); + } + else + { + EmitSound( "Weapon_StunStick.Deactivate" ); + } + #endif + +#else if ( m_bActive ) { //FIXME: START - Move to client-side @@ -415,6 +439,7 @@ void CWeaponStunStick::SetStunState( bool state ) { EmitSound( "Weapon_StunStick.Deactivate" ); } +#endif } //-----------------------------------------------------------------------------