]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/shownames.qc
Allow observers to see player names, and also show the health of team mates to specta...
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index eae0e54b041cd8bb583a82a8f3f1a0fbe8bbbecf..32bd0f49e924b9a4d8e472df62f06440c340dbbb 100644 (file)
@@ -9,7 +9,7 @@ void Draw_ShowNames(entity ent)
 {
        if(!cvar("hud_shownames"))
                return;
-       if(spectatee_status < 0)
+       if(spectatee_status < 0 && !cvar("hud_shownames_observers"))
                return;
        if(ent.sv_entnum == player_localentnum && !cvar("chase_active"))
                return;
@@ -19,7 +19,8 @@ void Draw_ShowNames(entity ent)
                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))