From: FruitieX Date: Sun, 23 May 2010 18:02:42 +0000 (+0300) Subject: get rid of ons_showmap X-Git-Tag: xonotic-v0.1.0preview~541^2~132 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=58eefc4a87421dd598529152f6b7eb45c6e82f26;p=xonotic%2Fxonotic-data.pk3dir.git get rid of ons_showmap --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index a760d758c..2c9cbc7d0 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -980,7 +980,6 @@ bind F10 quit 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. diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 4898f1f75..de74def18 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -522,7 +522,6 @@ void GameCommand(string msg) { 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"); @@ -540,9 +539,6 @@ void GameCommand(string msg) 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); } diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 4324d0e04..85394b5ae 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -599,7 +599,7 @@ void CSQC_UpdateView(float w, float h) 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; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index fbc73ad94..ec5e64f7f 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2132,7 +2132,7 @@ void HUD_Radar(void) 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(); @@ -2216,28 +2216,6 @@ void HUD_Radar(void) 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)); ) @@ -3230,7 +3208,7 @@ void HUD_Main (void) 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(); diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index c6a72dcb4..f00e49c53 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -31,7 +31,6 @@ vector mi_center; vector mi_scale; // Minimap string minimapname; -float ons_showmap; // -------------------------------------------------------------------------- // General stuff diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 0d7d91a7b..1a4ec0045 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -188,37 +188,23 @@ float hud_radar_zoommode; 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