Fix beretta viewmodel again.

This commit is contained in:
Night Owl 2016-10-22 14:04:43 +05:00
parent de458c7e5c
commit d1d76a4ba7

View File

@ -106,7 +106,7 @@ int CGlock::GetItemInfo( ItemInfo *p )
BOOL CGlock::Deploy()
{
pev->body = SILENCER_ON;
pev->body = m_fSilencerOn ? SILENCER_ON : SILENCER_OFF;
return DefaultDeploy( "models/v_9mmhandgun.mdl", "models/p_9mmhandgun.mdl", GLOCK_DRAW, "onehanded", UseDecrement(), pev->body );
}
void CGlock::Holster( int skiplocal /*= 0*/ )
@ -197,7 +197,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim )
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
// silenced
if( pev->body == 1 )
if( m_fSilencerOn )
{
m_pPlayer->m_iWeaponVolume = QUIET_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;