Skip to content

Commit

Permalink
Add regen check to disruption sound
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Nov 18, 2024
1 parent 13dde16 commit 76ffb8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SourceCode/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,10 @@ int CBasePlayer :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker,
if (sv_aura_regeneration.value != 0 && pev->armorvalue < MAX_NORMAL_BATTERY && fTookDamage)
{
STOP_SOUND(ENT(pev), CHAN_STATIC, "items/suitcharge_no_lp.wav");
if (!m_fRegenOn && !isShieldEmpty)
if (m_fRegenOn && !isShieldEmpty)
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/suitchargeno1.wav", 0.85, ATTN_NORM); // low-pitched elevbell
m_fRegenOn = false;

m_flNextSuitRegenTime = gpGlobals->time + 5.5 + sv_aura_regeneration_wait.value;
}
return fTookDamage;
Expand Down

0 comments on commit 76ffb8d

Please sign in to comment.