X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2Fshownames.qc;h=32bd0f49e924b9a4d8e472df62f06440c340dbbb;hb=HEAD;hp=23e5290b5f81de565bcf5bb61b9e8755199dcee8;hpb=acfbc35412c33aa3dc4192ac68dbe6b16f639370;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/client/shownames.qc b/data/qcsrc/client/shownames.qc index 23e5290b..32bd0f49 100644 --- a/data/qcsrc/client/shownames.qc +++ b/data/qcsrc/client/shownames.qc @@ -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);