seta hud_panel_radar_scale "" "distance you can see on the team radar"
seta hud_panel_radar_maximized_scale "" "distance you can see on the radar when maximized"
seta hud_panel_radar_maximized_size "" "size of the radar when maximized"
+seta hud_panel_radar_maximized_rotation "" "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north"
+seta hud_panel_radar_maximized_zoommode "" "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
seta hud_panel_score "" "enable/disable this panel"
seta hud_panel_score_pos "" "position of this base of the panel"
seta hud_panel_radar_scale "4096"
seta hud_panel_radar_maximized_scale "8192"
seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "0"
+seta hud_panel_radar_maximized_zoommode "0"
seta hud_panel_score 1
seta hud_panel_score_pos "0.890000 0.030000"
seta hud_panel_radar_scale "4096"
seta hud_panel_radar_maximized_scale "8192"
seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "0"
+seta hud_panel_radar_maximized_zoommode "0"
seta hud_panel_score 1
seta hud_panel_score_pos "0.465000 0.045000"
seta hud_panel_radar_scale "4096"
seta hud_panel_radar_maximized_scale "8192"
seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "0"
+seta hud_panel_radar_maximized_zoommode "0"
seta hud_panel_score 1
seta hud_panel_score_pos "0.465000 0.045000"
seta hud_panel_radar_scale "4096"
seta hud_panel_radar_maximized_scale "8192"
seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "0"
+seta hud_panel_radar_maximized_zoommode "0"
seta hud_panel_score 1
seta hud_panel_score_pos "0.020000 0.920000"
seta hud_panel_radar_scale "4096"
seta hud_panel_radar_maximized_scale "8192"
seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "0"
+seta hud_panel_radar_maximized_zoommode "0"
seta hud_panel_score 1
seta hud_panel_score_pos "0.760000 0.910000"
float autocvar_hud_panel_radar_rotation;
float autocvar_hud_panel_radar_scale;
float autocvar_hud_panel_radar_zoommode;
+float autocvar_hud_panel_radar_maximized_rotation;
+float autocvar_hud_panel_radar_maximized_zoommode;
float autocvar_hud_panel_score;
float autocvar_hud_panel_score_rankings;
float autocvar_hud_panel_timer;
HUD_Panel_UpdateCvars(radar);
HUD_Panel_ApplyFadeAlpha();
+
+ float f = 0;
if (hud_panel_radar_maximized && !autocvar__hud_configure)
{
panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized
if(precache_pic(panel_bg) == "") { panel_bg = "gfx/hud/default/border_default"; } // fallback
+
+ switch(hud_panel_radar_maximized_zoommode)
+ {
+ default:
+ case 0:
+ f = current_zoomfraction;
+ break;
+ case 1:
+ f = 1 - current_zoomfraction;
+ break;
+ case 2:
+ f = 0;
+ break;
+ case 3:
+ f = 1;
+ break;
+ }
+
+ switch(hud_panel_radar_maximized_rotation)
+ {
+ case 0:
+ teamradar_angle = view_angles_y - 90;
+ break;
+ default:
+ teamradar_angle = 90 * hud_panel_radar_maximized_rotation;
+ break;
+ }
+ }
+ if (!hud_panel_radar_maximized && !autocvar__hud_configure)
+ {
+ switch(hud_panel_radar_zoommode)
+ {
+ default:
+ case 0:
+ f = current_zoomfraction;
+ break;
+ case 1:
+ f = 1 - current_zoomfraction;
+ break;
+ case 2:
+ f = 0;
+ break;
+ case 3:
+ f = 1;
+ break;
+ }
+
+ switch(hud_panel_radar_rotation)
+ {
+ case 0:
+ teamradar_angle = view_angles_y - 90;
+ break;
+ default:
+ teamradar_angle = 90 * hud_panel_radar_rotation;
+ break;
+ }
}
vector pos, mySize;
float color2;
entity tm;
float scale2d, normalsize, bigsize;
- float f;
teamradar_origin2d = pos + 0.5 * mySize;
teamradar_size2d = mySize;
teamradar_loadcvars();
- switch(hud_panel_radar_zoommode)
- {
- default:
- case 0:
- f = current_zoomfraction;
- break;
- case 1:
- f = 1 - current_zoomfraction;
- break;
- case 2:
- f = 0;
- break;
- case 3:
- f = 1;
- break;
- }
-
- switch(hud_panel_radar_rotation)
- {
- case 0:
- teamradar_angle = view_angles_y - 90;
- break;
- default:
- teamradar_angle = 90 * hud_panel_radar_rotation;
- break;
- }
-
scale2d = vlen_maxnorm2d(mi_picmax - mi_picmin);
teamradar_size2d = mySize;
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(hud_panel_radar_rotation == 0)
+ if((hud_panel_radar_rotation == 0 && !hud_panel_radar_maximized) || (hud_panel_radar_maximized_rotation == 0 && hud_panel_radar_maximized))
{
// max-min distance must fit the radar in any rotation
bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_scale));
float hud_panel_radar_rotation;
noref vector hud_panel_radar_size; // fteqcc sucks
float hud_panel_radar_zoommode;
+float hud_panel_radar_maximized_zoommode;
+float hud_panel_radar_maximized_rotation;
void teamradar_loadcvars()
{
hud_panel_radar_foreground_alpha = autocvar_hud_panel_radar_foreground_alpha * panel_fg_alpha;
hud_panel_radar_rotation = autocvar_hud_panel_radar_rotation;
hud_panel_radar_zoommode = autocvar_hud_panel_radar_zoommode;
+ hud_panel_radar_maximized_rotation = autocvar_hud_panel_radar_maximized_rotation;
+ hud_panel_radar_maximized_zoommode = autocvar_hud_panel_radar_maximized_zoommode;
// others default to 0
// match this to defaultXonotic.cfg!