sp/src/game/server/hl2/weapon_sniperrifle.cpp
bool CWeaponSniperRifle::Reload( void )
{
	CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
	if (!pPlayer)
	{
		return false;
	}

	bool fRet;

	if (m_nZoomLevel > 0)
	{
		color32 lightRed = { 255, 50, 50, 32 };

		pPlayer->ShowViewModel(true);

		// Zoom out to the default zoom level
		WeaponSound(SPECIAL2);
		pPlayer->SetFOV( this, 0, 0.2f );

		UTIL_ScreenFade( pPlayer, lightRed, 0.2f, 0, (FFADE_IN|FFADE_PURGE) );
	}

	fRet = BaseClass::Reload();
	if ( fRet )
	{
		WeaponSound(RELOAD);
	}

	return fRet;
}
//-----------------------------------------------------------------------------
// Purpose: INSOLENCE: Same as base reload but zooms out before actually reloading.
//					   This lets us avoid those odd bugs where the reload itself and the reload animation would be out of sync. 
//					   Also an actual reload sound is played.
// Output : Returns true if the weapon was reloaded, false if no more ammo.
//-----------------------------------------------------------------------------
Same as base reload but zooms out before actually reloading.
This lets us avoid those odd bugs where the reload itself and the reload animation would be out of sync.
Also an actual reload sound is played.
Output : Returns true if the weapon was reloaded, false if no more ammo.
Same as base reload but zooms out before actually reloading . This lets us avoid those odd bugs where the reload itself and the reload animation would be out of sync . Also an actual reload sound is played . Output : Returns true if the weapon was reloaded false if no more ammo .
bool CWeaponSniperRifle::Reload( void )
{
	CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
	if (!pPlayer)
	{
		return false;
	}
	bool fRet;
	if (m_nZoomLevel > 0)
	{
		color32 lightRed = { 255, 50, 50, 32 };
		pPlayer->ShowViewModel(true);
		WeaponSound(SPECIAL2);
		pPlayer->SetFOV( this, 0, 0.2f );
		UTIL_ScreenFade( pPlayer, lightRed, 0.2f, 0, (FFADE_IN|FFADE_PURGE) );
	}
	fRet = BaseClass::Reload();
	if ( fRet )
	{
		WeaponSound(RELOAD);
	}
	return fRet;
}
bool CWeaponSniperRifle :: Reload ( void ) { CBasePlayer * pPlayer = ToBasePlayer ( GetOwner ( ) ) ; if ( ! pPlayer ) { return false ; } bool fRet ; if ( m_nZoomLevel > 0 ) { color32 lightRed = { 255 , 50 , 50 , 32 } ; pPlayer -> ShowViewModel ( true ) ; WeaponSound ( SPECIAL2 ) ; pPlayer -> SetFOV ( this , 0 , 0.2f ) ; UTIL_ScreenFade ( pPlayer , lightRed , 0.2f , 0 , ( FFADE_IN | FFADE_PURGE ) ) ; } fRet = BaseClass :: Reload ( ) ; if ( fRet ) { WeaponSound ( RELOAD ) ; } return fRet ; }
Purpose: INSOLENCE: Same as base reload but zooms out before actually reloading.
Purpose : INSOLENCE : Same as base reload but zooms out before actually reloading .
// Zoom out to the default zoom level