From 60f78dd545c477442dab82d50d2d3134dc5a77f6 Mon Sep 17 00:00:00 2001 From: Kamay Xutax Date: Tue, 23 Jul 2024 16:07:53 +0200 Subject: [PATCH] Debug only local player bullets, the rest is useless --- game/shared/cstrike/cs_player_shared.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game/shared/cstrike/cs_player_shared.cpp b/game/shared/cstrike/cs_player_shared.cpp index cef2f491d2..7ec5cf7f68 100644 --- a/game/shared/cstrike/cs_player_shared.cpp +++ b/game/shared/cstrike/cs_player_shared.cpp @@ -492,7 +492,7 @@ void CCSPlayer::FireBullet( #ifdef CLIENT_DLL static ConVarRef cl_showfirebullethitboxes("cl_showfirebullethitboxes"); - if (cl_showfirebullethitboxes.GetBool()) + if (cl_showfirebullethitboxes.GetBool() && IsLocalPlayer()) { for (int i = 1; i <= gpGlobals->maxClients; i++) { @@ -569,7 +569,7 @@ void CCSPlayer::FireBullet( static ConVarRef cl_showimpacts("cl_showimpacts"); - if (cl_showimpacts.GetInt() == 1 || cl_showimpacts.GetInt() == 2) + if ((cl_showimpacts.GetInt() == 1 || cl_showimpacts.GetInt() == 2) && IsLocalPlayer()) { NDebugOverlay::SweptBox(vecSrc, tr.endpos, @@ -588,7 +588,7 @@ void CCSPlayer::FireBullet( { C_BasePlayer* player = ToBasePlayer(tr.m_pEnt); - if (cl_showimpacts.GetInt() == 1 || cl_showimpacts.GetInt() == 2) + if ((cl_showimpacts.GetInt() == 1 || cl_showimpacts.GetInt() == 2) && IsLocalPlayer()) { player->DrawClientHitboxes(60.0f, true); }