Browse Source

Add deny noise for func_recharger and func_healthcharger, when activator's health/armor is full

hltopdown
tyabus 6 years ago committed by Alibek Omarov
parent
commit
1f2f268173
  1. 2
      dlls/h_battery.cpp
  2. 2
      dlls/healthkit.cpp

2
dlls/h_battery.cpp

@ -116,7 +116,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
} }
// if the player doesn't have the suit, or there is no juice left, make the deny noise // if the player doesn't have the suit, or there is no juice left, make the deny noise
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) ) if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( pActivator->pev->armorvalue == 100 ) )
{ {
if( m_flSoundTime <= gpGlobals->time ) if( m_flSoundTime <= gpGlobals->time )
{ {

2
dlls/healthkit.cpp

@ -187,7 +187,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u
} }
// if the player doesn't have the suit, or there is no juice left, make the deny noise // if the player doesn't have the suit, or there is no juice left, make the deny noise
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) ) if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( pActivator->pev->health == 100 ) )
{ {
if( m_flSoundTime <= gpGlobals->time ) if( m_flSoundTime <= gpGlobals->time )
{ {

Loading…
Cancel
Save