Night Owl 8 years ago
parent
commit
e5f6f7d9ac
  1. 17
      dlls/shotgun.cpp
  2. 1
      dlls/weapons.h

17
dlls/shotgun.cpp

@ -169,7 +169,7 @@ void CShotgun::PrimaryAttack()
// HEV suit - indicate out of ammo condition // HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 ); m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 );
if( m_iClip != 0 ) //if( m_iClip != 0 )
m_flPumpTime = gpGlobals->time + 0.5; m_flPumpTime = gpGlobals->time + 0.5;
m_flNextPrimaryAttack = GetNextAttackDelay( 0.75 ); m_flNextPrimaryAttack = GetNextAttackDelay( 0.75 );
@ -240,7 +240,7 @@ void CShotgun::SecondaryAttack( void )
// HEV suit - indicate out of ammo condition // HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 ); m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 );
if( m_iClip != 0 ) //if( m_iClip != 0 )
m_flPumpTime = gpGlobals->time + 0.95; m_flPumpTime = gpGlobals->time + 0.95;
m_flNextPrimaryAttack = GetNextAttackDelay( 1.5 ); m_flNextPrimaryAttack = GetNextAttackDelay( 1.5 );
@ -299,18 +299,21 @@ void CShotgun::Reload( void )
} }
} }
void CShotgun::WeaponIdle( void ) void CShotgun::WeaponTick()
{ {
ResetEmptySound();
m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if( m_flPumpTime && m_flPumpTime < gpGlobals->time ) if( m_flPumpTime && m_flPumpTime < gpGlobals->time )
{ {
// play pumping sound // play pumping sound
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/scock1.wav", 1, ATTN_NORM, 0, 95 + RANDOM_LONG( 0, 0x1f ) ); EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/scock1.wav", 1, ATTN_NORM, 0, 95 + RANDOM_LONG( 0, 0x1f ) );
m_flPumpTime = 0; m_flPumpTime = 0;
} }
}
void CShotgun::WeaponIdle( void )
{
ResetEmptySound();
m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )
{ {

1
dlls/weapons.h

@ -632,6 +632,7 @@ public:
void SecondaryAttack( void ); void SecondaryAttack( void );
BOOL Deploy( ); BOOL Deploy( );
void Reload( void ); void Reload( void );
void WeaponTick();
void WeaponIdle( void ); void WeaponIdle( void );
int m_fInReload; int m_fInReload;
float m_flNextReload; float m_flNextReload;

Loading…
Cancel
Save