Merge pull request #8862 from ChillerDragon/pr_consistent_nolint_fireweapon

Consistently apply the NOLINT comment for all sounds in FireWeapon
This commit is contained in:
Dennis Felsing 2024-09-01 07:11:03 +00:00 committed by GitHub
commit fcf810cae1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -442,7 +442,7 @@ void CCharacter::FireWeapon()
if(m_PainSoundTimer <= 0 && !(m_LatestPrevInput.m_Fire & 1)) if(m_PainSoundTimer <= 0 && !(m_LatestPrevInput.m_Fire & 1))
{ {
m_PainSoundTimer = 1 * Server()->TickSpeed(); m_PainSoundTimer = 1 * Server()->TickSpeed();
GameServer()->CreateSound(m_Pos, SOUND_PLAYER_PAIN_LONG, TeamMask()); GameServer()->CreateSound(m_Pos, SOUND_PLAYER_PAIN_LONG, TeamMask()); // NOLINT(clang-analyzer-unix.Malloc)
} }
return; return;
} }
@ -459,7 +459,7 @@ void CCharacter::FireWeapon()
{ {
// reset objects Hit // reset objects Hit
m_NumObjectsHit = 0; m_NumObjectsHit = 0;
GameServer()->CreateSound(m_Pos, SOUND_HAMMER_FIRE, TeamMask()); GameServer()->CreateSound(m_Pos, SOUND_HAMMER_FIRE, TeamMask()); // NOLINT(clang-analyzer-unix.Malloc)
Antibot()->OnHammerFire(m_pPlayer->GetCid()); Antibot()->OnHammerFire(m_pPlayer->GetCid());
@ -567,7 +567,7 @@ void CCharacter::FireWeapon()
MouseTarget // MouseTarget MouseTarget // MouseTarget
); );
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE, TeamMask()); GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE, TeamMask()); // NOLINT(clang-analyzer-unix.Malloc)
} }
break; break;
@ -589,7 +589,7 @@ void CCharacter::FireWeapon()
m_Core.m_Ninja.m_CurrentMoveTime = g_pData->m_Weapons.m_Ninja.m_Movetime * Server()->TickSpeed() / 1000; m_Core.m_Ninja.m_CurrentMoveTime = g_pData->m_Weapons.m_Ninja.m_Movetime * Server()->TickSpeed() / 1000;
m_Core.m_Ninja.m_OldVelAmount = length(m_Core.m_Vel); m_Core.m_Ninja.m_OldVelAmount = length(m_Core.m_Vel);
GameServer()->CreateSound(m_Pos, SOUND_NINJA_FIRE, TeamMask()); GameServer()->CreateSound(m_Pos, SOUND_NINJA_FIRE, TeamMask()); // NOLINT(clang-analyzer-unix.Malloc)
} }
break; break;
} }