This commit is contained in:
NachosChipeados 2025-04-02 20:04:54 -04:00 committed by GitHub
commit a328934d77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -1194,7 +1194,7 @@ void CTFMinigun::ItemPreFrame( void )
BaseClass::ItemPreFrame();
}
extern ConVar cl_ejectbrass;
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
@ -1206,6 +1206,9 @@ void CTFMinigun::StartBrassEffect()
if ( !m_hEjectBrassWeapon )
return;
if ( cl_ejectbrass.GetBool() == false )
return;
if ( UsingViewModel() && !g_pClientMode->ShouldDrawViewModel() )
{
// Prevent effects when the ViewModel is hidden with r_drawviewmodel=0

View file

@ -4829,6 +4829,7 @@ int CTFWeaponBase::GetSkin()
#if defined( CLIENT_DLL )
extern ConVar cl_ejectbrass;
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
@ -4836,6 +4837,9 @@ bool CTFWeaponBase::OnFireEvent( C_BaseViewModel *pViewModel, const Vector& orig
{
if ( event == 6002 && ShouldEjectBrass() )
{
if ( cl_ejectbrass.GetBool() == false )
return true;
if ( UsingViewModel() && !g_pClientMode->ShouldDrawViewModel() )
{
// Prevent effects when the ViewModel is hidden with r_drawviewmodel=0