From: MirceaKitsune Date: Sat, 17 Mar 2012 10:34:48 +0000 (+0200) Subject: Draw the radar foreground in front of players X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f01222f64429302444a6b57609d1069e5d6769be;p=voretournament%2Fvoretournament.git Draw the radar foreground in front of players --- diff --git a/data/qcsrc/client/radar.qc b/data/qcsrc/client/radar.qc index 2808d339..bae1c5c5 100644 --- a/data/qcsrc/client/radar.qc +++ b/data/qcsrc/client/radar.qc @@ -53,15 +53,14 @@ vector yinvert(vector v) return v; } -void draw_radar_background(float ca, float bg, float fg) +void draw_radar_background(float ca, float bg) { - vector col, rgb; + vector col; vector pos1, pos2, pos3, pos4; pos1 = '1 0 0' * (radar_origin2d_x - radar_size2d_x * 0.5 + radar_extraclip_mins_x) + '0 1 0' * (radar_origin2d_y - radar_size2d_y * 0.5 + radar_extraclip_mins_y); pos2 = '1 0 0' * (radar_origin2d_x + radar_size2d_x * 0.5 + radar_extraclip_maxs_x) + '0 1 0' * (radar_origin2d_y - radar_size2d_y * 0.5 + radar_extraclip_mins_y); pos3 = '1 0 0' * (radar_origin2d_x + radar_size2d_x * 0.5 + radar_extraclip_maxs_x) + '0 1 0' * (radar_origin2d_y + radar_size2d_y * 0.5 + radar_extraclip_maxs_y); pos4 = '1 0 0' * (radar_origin2d_x - radar_size2d_x * 0.5 + radar_extraclip_mins_x) + '0 1 0' * (radar_origin2d_y + radar_size2d_y * 0.5 + radar_extraclip_maxs_y); - rgb = GetTeamRGB(GetPlayerColor(player_localentnum - 1)); if(bg > 0) { @@ -93,6 +92,17 @@ void draw_radar_background(float ca, float bg, float fg) } R_EndPolygon(); } +} + +void draw_radar_foreground(float fg) +{ + vector rgb; + vector pos1, pos2, pos3, pos4; + pos1 = '1 0 0' * (radar_origin2d_x - radar_size2d_x * 0.5 + radar_extraclip_mins_x) + '0 1 0' * (radar_origin2d_y - radar_size2d_y * 0.5 + radar_extraclip_mins_y); + pos2 = '1 0 0' * (radar_origin2d_x + radar_size2d_x * 0.5 + radar_extraclip_maxs_x) + '0 1 0' * (radar_origin2d_y - radar_size2d_y * 0.5 + radar_extraclip_mins_y); + pos3 = '1 0 0' * (radar_origin2d_x + radar_size2d_x * 0.5 + radar_extraclip_maxs_x) + '0 1 0' * (radar_origin2d_y + radar_size2d_y * 0.5 + radar_extraclip_maxs_y); + pos4 = '1 0 0' * (radar_origin2d_x - radar_size2d_x * 0.5 + radar_extraclip_mins_x) + '0 1 0' * (radar_origin2d_y + radar_size2d_y * 0.5 + radar_extraclip_maxs_y); + rgb = GetTeamRGB(GetPlayerColor(player_localentnum - 1)); if(fg > 0) { @@ -355,7 +365,7 @@ void() radar_view = radar_size2d_y + radar_extraclip_maxs_y - radar_extraclip_mins_y ); - draw_radar_background(cl_radar_content_alpha, cl_radar_background_alpha, cl_radar_foreground_alpha); + draw_radar_background(cl_radar_content_alpha, cl_radar_background_alpha); if(showmap) { @@ -381,6 +391,8 @@ void() radar_view = draw_radar_player(view_origin, view_angles, '1 1 1'); drawresetcliparea(); + + draw_radar_foreground(cl_radar_foreground_alpha); }; diff --git a/docs/TODO.txt b/docs/TODO.txt index 53a0caff..8de339e5 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -146,8 +146,8 @@ - 0.7: Bots should digest items even at 0 skill -- 0.7 BUG: Players on the minimap appear in front of the foreground - - 0.7: Farewell has an issue with the radar -- 0.7: Make self a different color on the radar (maybe just change brightness?) \ No newline at end of file +- 0.7: Make self a different color on the radar (maybe just change brightness?) + +- 0.7 | 0.8: Should the hud splash texture really be named blood? \ No newline at end of file