From 94025ad1d6005d371790a612f1ddd2f0dd830a8d Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 13 May 2010 19:28:06 +0200 Subject: [PATCH] teamradar: fix clip fail --- qcsrc/client/d | 19 ------------------- qcsrc/client/hud.qc | 20 +++----------------- qcsrc/client/teamradar.qc | 2 +- 3 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 qcsrc/client/d diff --git a/qcsrc/client/d b/qcsrc/client/d deleted file mode 100644 index d5a11c1ad..000000000 --- a/qcsrc/client/d +++ /dev/null @@ -1,19 +0,0 @@ ---- sbar.qc.BASE.4129.qc 2010-05-06 19:58:30.171990860 +0200 -+++ sbar.qc 2010-05-06 20:01:25.251979343 +0200 -@@ -3395,8 +3395,15 @@ - rr = RACE_RECORD; - t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time"))); - -- if(score && score < t || !t) -+ if(score && (score < t || !t)) { - db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score)); -+ if(cvar("cl_autodemo_delete_keeprecords")) -+ { -+ f = cvar("cl_autodemo_delete"); -+ f &~= 1; -+ cvar_set("cl_autodemo_delete", ftos(f)); // don't delete demo with new record! -+ } -+ } - - if(t != crecordtime_prev) { - crecordtime_prev = t; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index b6b71d252..222823039 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2605,21 +2605,7 @@ void HUD_Radar(void) scale2d = vlen_maxnorm2d(mi_picmax - mi_picmin); teamradar_size2d = mySize; - teamradar_extraclip_mins = teamradar_extraclip_maxs = '0 0 0'; - if(pos == eX * vid_conwidth) - { - if(cl_teamradar_nohudhack < 2) - pos_y += 25; - if(cl_teamradar_nohudhack < 1) - teamradar_extraclip_mins_y -= 25; - } - else if(pos == eY * vid_conheight || pos == eX * vid_conwidth + eY * vid_conheight) - { - if(cl_teamradar_nohudhack < 2) - pos_y -= 50; - //if(cl_teamradar_nohudhack < 1) - //teamradar_extraclip_size_y += 50; // don't, the HUD looks nice - } + teamradar_extraclip_mins = teamradar_extraclip_maxs = '0 0 0'; // we always center // pixels per world qu to match the teamradar_size2d_x range in the longest dimension if(cl_teamradar_rotation == 0) @@ -2662,8 +2648,8 @@ void HUD_Radar(void) drawsetcliparea( pos_x, pos_y, - pos_x + mySize_x, - pos_y + mySize_y + mySize_x, + mySize_y ); draw_teamradar_background(cl_teamradar_background_alpha, cl_teamradar_foreground_alpha); diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 2ba3f84da..89b4fa047 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -2,7 +2,7 @@ float teamradar_angle; // player yaw angle vector teamradar_origin3d_in_texcoord; // player origin vector teamradar_origin2d; // 2D origin vector teamradar_size2d; // 2D size -vector teamradar_extraclip_mins, teamradar_extraclip_maxs; // don't even ask +vector teamradar_extraclip_mins, teamradar_extraclip_maxs; // for non-centered radar display float teamradar_size; // 2D scale factor float cl_teamradar_scale; // window size = ...qu float cl_teamradar_nohudhack; -- 2.39.2