seta hud_panel_infomessages_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_panel_infomessages_flip "" "1 = align the items to the right"
-seta hud_panel_shownames "" "enable/disable this panel
+seta hud_panel_shownames "" "enable/disable this panel, 1 = teammates only, 2 = everyone"
seta hud_panel_shownames_pos "" "position of this base of the panel"
seta hud_panel_shownames_size "" "size of this panel"
seta hud_panel_shownames_bg "" "if set to something else than \"\" = override default background"
void Net_ShowNames()
{
+ string thename;
+ float thehealth, thearmor;
+
if(shownames_netname)
strunzone(shownames_netname);
- shownames_netname = strzone(ReadString());
- shownames_health = ReadByte();
- shownames_armor = ReadByte();
- shownames_time = time + autocvar_hud_panel_shownames_sustain;
+ thename = strzone(ReadString());
+ thehealth = ReadByte();
+ thearmor = ReadByte();
+
+ if(autocvar_hud_panel_shownames == 1 && thehealth > 0) // teammates only
+ {
+ shownames_netname = thename;
+ shownames_health = thehealth;
+ shownames_armor = thearmor;
+
+ shownames_time = time + autocvar_hud_panel_shownames_sustain;
+ }
+ else if(autocvar_hud_panel_shownames == 2)
+ {
+ shownames_netname = thename;
+ shownames_health = thehealth;
+ shownames_armor = thearmor;
+
+ shownames_time = time + autocvar_hud_panel_shownames_sustain;
+ }
}
// CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.