Fix hud_showtargetid doing nothing

This commit is contained in:
speedvoltage 2025-03-11 17:16:20 +01:00
parent a62efecf62
commit f7bb47d7cb
3 changed files with 9 additions and 1 deletions

View file

@ -135,6 +135,12 @@ void C_HL2MP_Player::UpdateIDTarget()
if ( !IsLocalPlayer() )
return;
if ( !hud_showtargetid.GetBool() )
{
m_iIDEntIndex = 0;
return;
}
// Clear old target and find a new one
m_iIDEntIndex = 0;

View file

@ -14,6 +14,8 @@ class C_HL2MP_Player;
#include "hl2mp_player_shared.h"
#include "beamdraw.h"
extern ConVar hud_showtargetid;
//=============================================================================
//=============================================================================
class CSuitPowerDevice

View file

@ -21,7 +21,7 @@
#define PLAYER_HINT_DISTANCE_SQ (PLAYER_HINT_DISTANCE*PLAYER_HINT_DISTANCE)
static ConVar hud_centerid( "hud_centerid", "1" );
static ConVar hud_showtargetid( "hud_showtargetid", "1" );
ConVar hud_showtargetid( "hud_showtargetid", "1" );
//-----------------------------------------------------------------------------
// Purpose: