]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/radar.qc
Radar: Don't draw the player we are spectating
[voretournament/voretournament.git] / data / qcsrc / client / radar.qc
index bae1c5c57ae9408d631853ebe6628160e11be423..a7cd6304446679f0d3ec0e30cc8f04b10baa5af4 100644 (file)
@@ -385,7 +385,9 @@ void() radar_view =
        for(tm = world; (tm = find(tm, classname, "entcs_receiver")); )\r
        {\r
                col = GetPlayerColor(tm.sv_entnum);\r
-               //if(color == COLOR_SPECTATOR || color == col)\r
+               if(cvar("cl_radar_players") > 1 || (cvar("cl_radar_players") > 0 && teamplay && GetPlayerColor(player_localentnum - 1) == col))\r
+               if not(tm.sv_entnum == spectatee_status - 1) // don't show the player we are spectating, since we also draw ourself separately\r
+               if not(tm.eaten) // don't show prey on the radar\r
                        draw_radar_player(tm.origin, tm.angles, GetTeamRGB(col));\r
        }\r
        draw_radar_player(view_origin, view_angles, '1 1 1');\r