From 385d4ae2aee0b39a024c50047c4ea3c841940af8 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 18 Mar 2012 13:44:33 +0200 Subject: [PATCH] Allow setting which players to see on the radar. Either show no players, either team mates, either all players --- data/defaultVT.cfg | 1 + data/qcsrc/client/radar.qc | 2 +- .../menu/voret/dialog_multiplayer_playersetup_hud.c | 12 +++++++++++- docs/TODO.txt | 2 -- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index e557149c..d33fe5ad 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1396,6 +1396,7 @@ seta sv_status_privacy 1 "hide IP addresses from \"status\" replies shown to cli seta cl_radar 2 "show radar. 1 in team maches, 2 always" +seta cl_radar_players 2 "show players on the radar. 0 disables, 1 shows only team mates, 2 shows all players" seta cl_radar_content_alpha 0.9 "alpha of the minimap" seta cl_radar_background_alpha 0.5 "set to -1 to disable" seta cl_radar_foreground_alpha 0.9 "set to -1 to disable" diff --git a/data/qcsrc/client/radar.qc b/data/qcsrc/client/radar.qc index 6e03aa11..dd766b7d 100644 --- a/data/qcsrc/client/radar.qc +++ b/data/qcsrc/client/radar.qc @@ -385,7 +385,7 @@ void() radar_view = for(tm = world; (tm = find(tm, classname, "entcs_receiver")); ) { col = GetPlayerColor(tm.sv_entnum); - //if(color == COLOR_SPECTATOR || color == col) + if(cvar("cl_radar_players") > 1 || (cvar("cl_radar_players") > 0 && teamplay && GetPlayerColor(player_localentnum - 1) == col)) if not(tm.eaten) // don't show prey on the radar draw_radar_player(tm.origin, tm.angles, GetTeamRGB(col)); } diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c index 4960b91e..066bd474 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c @@ -6,7 +6,7 @@ CLASS(VoretHudDialog) EXTENDS(VoretDialog) ATTRIB(VoretHudDialog, title, string, "Radar, HUD & Waypoints") ATTRIB(VoretHudDialog, color, vector, SKINCOLOR_DIALOG_HUD) ATTRIB(VoretHudDialog, intendedWidth, float, 1) - ATTRIB(VoretHudDialog, rows, float, 19) + ATTRIB(VoretHudDialog, rows, float, 20) ATTRIB(VoretHudDialog, columns, float, 8) ENDCLASS(VoretHudDialog) #endif @@ -95,6 +95,16 @@ void fillVoretHudDialog(entity me) me.TD(me, 1, 1.2, e = makeVoretRadioButton(1, "cl_radar", "0", "Disabled")); me.TD(me, 1, 1.2, e = makeVoretRadioButton(1, "cl_radar", "1", "Team games")); me.TD(me, 1, 1.2, e = makeVoretRadioButton(1, "cl_radar", "2", "Always")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Show players:")); + setDependent(e, "cl_radar", 1, 2); + me.TD(me, 1, 3, e = makeVoretTextSlider("cl_radar_players")); + e.addValue(e, "Disabled", "0"); + e.addValue(e, "Teammates", "1"); + e.addValue(e, "All players", "2"); + e.configureVoretTextSliderValues(e); + setDependent(e, "cl_radar", 1, 2); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Foreground:")); diff --git a/docs/TODO.txt b/docs/TODO.txt index 6ba2edc1..0e11c16c 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -64,8 +64,6 @@ - 0.8: Remake helper voices -- 0.8: Add a checkpvs() check in sending entcs (where radar_showenemies used to be), to not send it for enemies behind walls - - 0.8: Loading screens with messages - +0.8: Refraction effect for damage when you have armor (using a model) -- 2.39.2