]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/shownames.qc
Include gmqcc binaries for Windows and Linux
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index 23e5290b5f81de565bcf5bb61b9e8755199dcee8..32bd0f49e924b9a4d8e472df62f06440c340dbbb 100644 (file)
@@ -9,13 +9,18 @@ void Draw_ShowNames(entity ent)
 {
        if(!cvar("hud_shownames"))
                return;
+       if(spectatee_status < 0 && !cvar("hud_shownames_observers"))
+               return;
        if(ent.sv_entnum == player_localentnum && !cvar("chase_active"))
                return;
        if(getstati(STAT_VORE_EATEN) && cvar("cl_vore_stomachmodel") >= 1 && !cvar("chase_active"))
                return;
+       if(ent.eaten)
+               return;
 
        float sameteam;
-       if(teamplay && (GetPlayerColor(player_localentnum - 1) == GetPlayerColor(ent.sv_entnum - 1)))
+       if(teamplay && spectatee_status >= 0)
+       if((GetPlayerColor(player_localentnum - 1) == GetPlayerColor(ent.sv_entnum - 1)) || (GetPlayerColor(spectatee_status - 1) == GetPlayerColor(ent.sv_entnum - 1)))
                sameteam = TRUE;
 
        if(sameteam || (!sameteam && cvar("hud_shownames") > 1))
@@ -166,11 +171,13 @@ void Draw_ShowNames_All()
                {
                        e.healthvalue = entcs.healthvalue;
                        e.armorvalue = entcs.armorvalue;
+                       e.eaten = entcs.eaten;
                }
                else
                {
                        e.healthvalue = 2342;
                        e.armorvalue = 0;
+                       e.eaten = 0;
                }
 
                e.origin = getplayerorigin(i);