mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Only send pain sound in freeze if fire was released
This commit is contained in:
parent
955ccb9995
commit
c98a1f0a59
|
@ -367,7 +367,7 @@ void CCharacter::FireWeapon()
|
|||
if(CountInput(m_LatestPrevInput.m_Fire, m_LatestInput.m_Fire).m_Presses)
|
||||
WillFire = true;
|
||||
|
||||
if(FullAuto && (m_LatestInput.m_Fire&1) && m_aWeapons[m_Core.m_ActiveWeapon].m_Ammo && !m_FreezeTime)
|
||||
if(FullAuto && (m_LatestInput.m_Fire&1) && m_aWeapons[m_Core.m_ActiveWeapon].m_Ammo)
|
||||
WillFire = true;
|
||||
|
||||
if(!WillFire)
|
||||
|
@ -376,7 +376,7 @@ void CCharacter::FireWeapon()
|
|||
if (m_FreezeTime)
|
||||
{
|
||||
// Timer stuff to avoid shrieking orchestra caused by unfreeze-plasma
|
||||
if(m_PainSoundTimer<=0)
|
||||
if(m_PainSoundTimer<=0 && !(m_LatestPrevInput.m_Fire&1))
|
||||
{
|
||||
m_PainSoundTimer = 1 * Server()->TickSpeed();
|
||||
GameServer()->CreateSound(m_Pos, SOUND_PLAYER_PAIN_LONG, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
|
||||
|
|
Loading…
Reference in a new issue