From: FruitieX <fruitiex@gmail.com>
Date: Sat, 2 Apr 2011 21:18:15 +0000 (+0300)
Subject: make the delay configurable
X-Git-Tag: xonotic-v0.5.0~305^2~4
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3471968c1d8c4b82606ff9962a6338fca687768d;p=xonotic%2Fxonotic-data.pk3dir.git

make the delay configurable
---

diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg
index e9e50c5c1..03234e198 100644
--- a/defaultXonotic.cfg
+++ b/defaultXonotic.cfg
@@ -1438,6 +1438,8 @@ seta hud_panel_engineinfo_framecounter_exponentialmovingaverage 1 "use an averag
 seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight 0.1 "weight of latest data point"
 seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_change_threshold 0.5 "threshold for fps change when to update instantly, to make big fps changes update faster"
 
+seta hud_panel_shownames_sustain 0.5 "seconds that shownames will sustain after not aiming at a player anymore"
+
 seta hud_showbinds 1	"the way to show the keys to press in HUD messages: 0 displays commands, 1 bound keys, 2 both"
 seta hud_showbinds_limit 2	"maximum number of bound keys to show for a command. 0 for unlimited"
 
diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc
index d20864032..7d84aa161 100644
--- a/qcsrc/client/Main.qc
+++ b/qcsrc/client/Main.qc
@@ -1336,7 +1336,7 @@ void Net_ShowNames()
     shownames_netname = strzone(ReadString());
     shownames_health = ReadByte();
     shownames_armor = ReadByte();
-    shownames_time = time + 0.25;
+    shownames_time = time + autocvar_hud_panel_shownames_sustain;
 }
 
 // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh
index 42528ef1d..762472fcc 100644
--- a/qcsrc/client/autocvars.qh
+++ b/qcsrc/client/autocvars.qh
@@ -238,6 +238,7 @@ float autocvar_hud_panel_radar_scale;
 float autocvar_hud_panel_radar_zoommode;
 float autocvar_hud_panel_score;
 float autocvar_hud_panel_shownames;
+float autocvar_hud_panel_shownames_sustain;
 float autocvar_hud_panel_timer;
 float autocvar_hud_panel_timer_increment;
 float autocvar_hud_panel_vote;