]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Resize waypoints like everything else when viewsize is < 100; it closes #1430
authorterencehill <piuntn@gmail.com>
Sat, 17 Sep 2016 15:36:14 +0000 (17:36 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 17 Sep 2016 15:37:06 +0000 (17:37 +0200)
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/turrets/cl_turrets.qc

index 7e5f79317f6dc046238f83bf5c8995da2b12b077..e7a33567b62227403780bb71320f25ea9f56bbc0 100644 (file)
@@ -611,11 +611,9 @@ void Draw_WaypointSprite(entity this)
     (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o.x,
     (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o.y);
 
-    float vidscale = max(vid_conwidth / vid_width, vid_conheight / vid_height);
-
     float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
 
-    t = waypointsprite_scale * vidscale;
+    t = waypointsprite_scale;
     a *= waypointsprite_alpha;
 
     {
index a893b3e8a77d30c281ef602770dc6098319947f6..c21e327d4470655336e6033d1823587c65f6e458 100644 (file)
@@ -156,17 +156,14 @@ void turret_draw2d(entity this)
 
        o_z = 0;
 
-       float edgedistance_min, crosshairdistance;
-               edgedistance_min = min((o_y - (vid_conheight * waypointsprite_edgeoffset_top)),
+       float edgedistance_min = min((o.y - (vid_conheight * waypointsprite_edgeoffset_top)),
        (o_x - (vid_conwidth * waypointsprite_edgeoffset_left)),
        (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o_x,
        (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o_y);
 
-       float vidscale = max(vid_conwidth / vid_width, vid_conheight / vid_height);
+       float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
 
-       crosshairdistance = sqrt( pow(o_x - vid_conwidth/2, 2) + pow(o_y - vid_conheight/2, 2) );
-
-       t = waypointsprite_scale * vidscale;
+       t = waypointsprite_scale;
        a *= waypointsprite_alpha;
 
        {