]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make use of mi_center and mi_scale, they were initialized but not used
authorterencehill <piuntn@gmail.com>
Fri, 19 Nov 2010 23:12:11 +0000 (00:12 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 19 Nov 2010 23:12:11 +0000 (00:12 +0100)
qcsrc/client/hud.qc
qcsrc/client/waypointsprites.qc

index f77f1c1c1af2b1009147f2f7a27978126c2fc580..3090485197a50646fad77db9a37038a42b17a83a 100644 (file)
@@ -3505,7 +3505,7 @@ void HUD_Radar(void)
        if(hud_panel_radar_rotation == 0)
        {
                // max-min distance must fit the radar in any rotation
-               bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_max - mi_min));
+               bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_scale));
        }
        else
        {
@@ -3533,7 +3533,7 @@ void HUD_Radar(void)
                  f * bigsize
                + (1 - f) * normalsize;
        teamradar_origin3d_in_texcoord = teamradar_3dcoord_to_texcoord(
-                 f * (mi_min + mi_max) * 0.5
+                 f * mi_center
                + (1 - f) * view_origin);
 
        color1 = GetPlayerColor(player_localentnum-1);
index 816a2e4851eb8827eee5505e67e91f99b1e65844..ee11d11ed0830db7c755048ec6b1d4221db7757d 100644 (file)
@@ -409,7 +409,7 @@ void Ent_WaypointSprite()
 
 void WaypointSprite_Load()
 {
-       waypointsprite_fadedistance = vlen(mi_max - mi_min);
+       waypointsprite_fadedistance = vlen(mi_scale);
        waypointsprite_normdistance = cvar("g_waypointsprite_normdistance");
        waypointsprite_minscale = cvar("g_waypointsprite_minscale");
        waypointsprite_minalpha = cvar("g_waypointsprite_minalpha");
@@ -424,7 +424,7 @@ void WaypointSprite_Load()
        waypointsprite_crosshairfadedistance = cvar("g_waypointsprite_crosshairfadedistance");
        waypointsprite_distancefadealpha = cvar_or("g_waypointsprite_distancefadealpha", 1);
        waypointsprite_distancefadescale = cvar_or("g_waypointsprite_distancefadescale", 1);
-       waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * cvar_or("g_waypointsprite_distancefadedistancemultiplier", 1);
+       waypointsprite_distancefadedistance = waypointsprite_fadedistance * cvar_or("g_waypointsprite_distancefadedistancemultiplier", 1);
        waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - autocvar__menu_alpha);
 
        if(!waypointsprite_initialized)