get rid of ons_showmap
authorFruitieX <rasse@rasse-lappy.localdomain>
Sun, 23 May 2010 18:02:42 +0000 (21:02 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Sun, 23 May 2010 18:02:42 +0000 (21:02 +0300)
defaultXonotic.cfg
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/main.qh
qcsrc/client/teamradar.qc

index a760d75..2c9cbc7 100644 (file)
@@ -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.
index 4898f1f..de74def 100644 (file)
@@ -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);
        }
index 4324d0e..85394b5 100644 (file)
@@ -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;
index fbc73ad..ec5e64f 100644 (file)
@@ -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();
index c6a72dc..f00e49c 100644 (file)
@@ -31,7 +31,6 @@ vector mi_center;
 vector mi_scale;
 // Minimap
 string minimapname;
-float ons_showmap;
 
 // --------------------------------------------------------------------------
 // General stuff
index 0d7d91a..1a4ec00 100644 (file)
@@ -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