@@ -72,12 +72,13 @@ void CASW_Weapon_Devastator::Precache()
7272 PrecacheModel ( " swarm/sprites/whiteglow1.vmt" );
7373 PrecacheModel ( " swarm/sprites/greylaser1.vmt" );
7474 PrecacheScriptSound ( " ASW_Weapon.Empty" );
75- PrecacheScriptSound ( " ASW_Weapon.Reload3" );
7675 PrecacheScriptSound ( " ASW_Weapon_Devastator.SingleFP" );
7776 PrecacheScriptSound ( " ASW_Weapon_Devastator.Single" );
7877 PrecacheScriptSound ( " ASW_Weapon_Devastator.ReloadA" );
7978 PrecacheScriptSound ( " ASW_Weapon_Devastator.ReloadB" );
8079 PrecacheScriptSound ( " ASW_Weapon_Devastator.ReloadC" );
80+ PrecacheScriptSound ( " ASW_Weapon_Devastator.LockModeOn" );
81+ PrecacheScriptSound ( " ASW_Weapon_Devastator.LockModeOff" );
8182
8283 BaseClass::Precache ();
8384}
@@ -171,21 +172,21 @@ const Vector& CASW_Weapon_Devastator::GetAngularBulletSpread()
171172
172173bool CASW_Weapon_Devastator::Reload ( void )
173174{
174- m_bLockedFire = false ;
175+ DisableLockFire () ;
175176
176177 return BaseClass::Reload ();
177178}
178179
179180bool CASW_Weapon_Devastator::Holster ( CBaseCombatWeapon *pSwitchingTo )
180181{
181- m_bLockedFire = false ;
182+ DisableLockFire () ;
182183
183184 return BaseClass::Holster ( pSwitchingTo );
184185}
185186
186187void CASW_Weapon_Devastator::Drop ( const Vector &vecVelocity )
187188{
188- m_bLockedFire = false ;
189+ DisableLockFire () ;
189190
190191 BaseClass::Drop ( vecVelocity );
191192}
@@ -197,11 +198,11 @@ void CASW_Weapon_Devastator::ItemPostFrame( void )
197198 CASW_Marine* pMarine = GetMarine ();
198199 if ( !pMarine || !pMarine->IsAlive () )
199200 {
200- m_bLockedFire = false ;
201+ DisableLockFire () ;
201202 return ;
202203 }
203204 if ( pMarine->GetCurrentMeleeAttack () )
204- m_bLockedFire = false ;
205+ DisableLockFire () ;
205206}
206207
207208void CASW_Weapon_Devastator::ItemBusyFrame ( void )
@@ -211,11 +212,11 @@ void CASW_Weapon_Devastator::ItemBusyFrame( void )
211212 CASW_Marine* pMarine = GetMarine ();
212213 if ( !pMarine || !pMarine->IsAlive () )
213214 {
214- m_bLockedFire = false ;
215+ DisableLockFire () ;
215216 return ;
216217 }
217218 if ( pMarine->GetCurrentMeleeAttack () )
218- m_bLockedFire = false ;
219+ DisableLockFire () ;
219220}
220221
221222void CASW_Weapon_Devastator::SecondaryAttack ()
@@ -227,8 +228,10 @@ void CASW_Weapon_Devastator::SecondaryAttack()
227228 if ( m_bLockedFire )
228229 {
229230 m_flNextPrimaryAttack = gpGlobals->curtime + 0 .5f ;
230- WeaponSound ( BURST );
231+ WeaponSound ( SPECIAL1 );
231232 }
233+ else
234+ WeaponSound ( BURST );
232235 }
233236 else
234237 {
@@ -258,3 +261,33 @@ float CASW_Weapon_Devastator::GetFireRate()
258261 return GetEquipItem ()->m_flFireRate ;
259262 }
260263}
264+
265+ void CASW_Weapon_Devastator::DisableLockFire ()
266+ {
267+ if (m_bLockedFire)
268+ {
269+ m_bLockedFire = false ;
270+ WeaponSound ( BURST );
271+ }
272+ }
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
0 commit comments