bind F11 disconnect
bind F12 screenshot
bind F4 ready
-bind m radar
bind ALT +showaccuracy
// Gamepad defaults. Tested with Logitech Rumblepad 2, I hope similar ones works as well.
{
print("Usage: cl_cmd COMMAND..., where possible commands are:\n");
print(" settemp cvar value\n");
- print(" radar\n");
print(" hud_columns_set ...\n");
print(" hud_columns_help\n");
GameCommand_Generic("help");
else if(cmd == "settemp") {
cvar_clientsettemp(argv(1), argv(2));
}
- else if(cmd == "radar") {
- ons_showmap = !ons_showmap;
- }
else if(cmd == "hud_columns_set") {
Cmd_HUD_SetFields(argc);
}
CSQC_common_hud();
// crosshair goes VERY LAST
- if(!scoreboard_active && !ons_showmap && !camera_active && !hudconf_active) {
+ if(!scoreboard_active && !camera_active && !hudconf_active) {
// TrueAim check
float shottype;
float bullets, ring_scale;
teamradar_origin2d = pos + 0.5 * mySize; // TODO: stupid compat, should be removed (hint: code seems to assume origin to be in center, where panelhud code uses pos as topleft pixel)
teamradar_size2d = mySize;
- if(minimapname == "" && !ons_showmap)
+ if(minimapname == "")
return;
teamradar_loadcvars();
draw_teamradar_background(hud_radar_background_alpha, hud_radar_foreground_alpha);
- if(ons_showmap)
- {
- drawresetcliparea();
-
- vector frame_origin, frame_size;
- frame_origin = frame_size = '0 0 0';
-
- frame_origin_x = pos_x - teamradar_size2d_x * 0.55859375; // matches the picture
- frame_origin_y = pos_y - teamradar_size2d_y * 0.55859375; // matches the picture
- frame_size_x = pos_x * 1.1171875; // matches the picture
- frame_size_y = pos_y * 1.1171875; // matches the picture
- drawpic_skin(frame_origin, "gfx/ons-frame.tga", frame_size, '1 1 1', hud_alpha_fg, 0);
- drawpic_skin(frame_origin, "gfx/ons-frame-team.tga", frame_size, rgb, hud_alpha_fg, 0);
-
- drawsetcliparea(
- pos_x - teamradar_size2d_x * 0.5,
- pos_y - teamradar_size2d_y * 0.5,
- teamradar_size2d_x,
- teamradar_size2d_y
- );
- }
-
for(tm = world; (tm = find(tm, classname, "radarlink")); )
draw_teamradar_link(tm.origin, tm.velocity, tm.team);
for(tm = world; (tm = findflags(tm, teamradar_icon, 0xFFFFFF)); )
HUD_Timer();
// TODO hud'ify
if(HUD_Panel_CheckActive(6))
- if(ons_showmap || cvar_string("hud_radar") != "0" && (cvar("hud_radar") == 2 || teamplay))
+ if(cvar_string("hud_radar") != "0" && (cvar("hud_radar") == 2 || teamplay))
HUD_Radar();
if(HUD_Panel_CheckActive(7))
HUD_Score();
vector mi_scale;
// Minimap
string minimapname;
-float ons_showmap;
// --------------------------------------------------------------------------
// General stuff
void teamradar_loadcvars()
{
v_flipped = cvar("v_flipped");
- if(ons_showmap)
- {
- hud_radar_scale = 42; // dummy, not used (see zoommode)
- hud_radar_background_alpha = 1 * (1 - cvar("_menu_alpha"));
- hud_radar_foreground_alpha = 1 * (1 - cvar("_menu_alpha"));
- hud_radar_rotation = cvar("hud_radar_rotation");
- if(!hud_radar_rotation)
- hud_radar_rotation = 4;
- hud_radar_zoommode = 3;
- hud_radar_nohudhack = 0;
- }
- else
- {
- hud_radar_scale = cvar("hud_radar_scale");
- hud_radar_background_alpha = cvar("hud_radar_background_alpha") * hud_alpha_fg;
- hud_radar_foreground_alpha = cvar("hud_radar_foreground_alpha") * hud_alpha_fg;
- hud_radar_rotation = cvar("hud_radar_rotation");
- hud_radar_zoommode = cvar("hud_radar_zoommode");
-
- // others default to 0
- // match this to defaultXonotic.cfg!
- if(!hud_radar_scale) hud_radar_scale = 4096;
- if(!hud_radar_background_alpha) hud_radar_background_alpha = 0.4 * hud_alpha_fg;
- if(!hud_radar_foreground_alpha) hud_radar_foreground_alpha = 0.8 * hud_alpha_fg;
- if(!hud_radar_size_x) hud_radar_size_x = 128;
- if(!hud_radar_size_y) hud_radar_size_y = hud_radar_size_x;
-
- hud_radar_size_z = 0;
- hud_radar_nohudhack = hud_radar_position_z;
- hud_radar_position_z = 0;
- }
+ hud_radar_scale = cvar("hud_radar_scale");
+ hud_radar_background_alpha = cvar("hud_radar_background_alpha") * hud_alpha_fg;
+ hud_radar_foreground_alpha = cvar("hud_radar_foreground_alpha") * hud_alpha_fg;
+ hud_radar_rotation = cvar("hud_radar_rotation");
+ hud_radar_zoommode = cvar("hud_radar_zoommode");
+
+ // others default to 0
+ // match this to defaultXonotic.cfg!
+ if(!hud_radar_scale) hud_radar_scale = 4096;
+ if(!hud_radar_background_alpha) hud_radar_background_alpha = 0.4 * hud_alpha_fg;
+ if(!hud_radar_foreground_alpha) hud_radar_foreground_alpha = 0.8 * hud_alpha_fg;
+ if(!hud_radar_size_x) hud_radar_size_x = 128;
+ if(!hud_radar_size_y) hud_radar_size_y = hud_radar_size_x;
+
+ hud_radar_size_z = 0;
+ hud_radar_nohudhack = hud_radar_position_z;
+ hud_radar_position_z = 0;
}
// radar links