From 5986ee03b9f024f23a816b56755e264282144d15 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sun, 1 Sep 2024 11:37:23 +0800 Subject: [PATCH] Consistently apply the NOLINT comment for all sounds in FireWeapon Most but not all sound creations in CCharacter::FireWeapon have this NOLINT comment. Somehow clang does not get tripped on all of those. But sooner or later it might. I currently got a new error in my downstream fork when tweaking FireWeapon a bit. So I applied the NOLINT comment to ALL occurences in FireWeapon not only the ones that clangd finds at the moment. --- src/game/server/entities/character.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 8e60014e8..482e9f135 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -442,7 +442,7 @@ void CCharacter::FireWeapon() if(m_PainSoundTimer <= 0 && !(m_LatestPrevInput.m_Fire & 1)) { 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; } @@ -459,7 +459,7 @@ void CCharacter::FireWeapon() { // reset objects Hit 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()); @@ -567,7 +567,7 @@ void CCharacter::FireWeapon() MouseTarget // MouseTarget ); - GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE, TeamMask()); + GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE, TeamMask()); // NOLINT(clang-analyzer-unix.Malloc) } 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_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; }