From: terencehill Date: Sat, 17 Sep 2016 15:36:14 +0000 (+0200) Subject: Resize waypoints like everything else when viewsize is < 100; it closes #1430 X-Git-Tag: xonotic-v0.8.2~577 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f2a66d445cf9f77199e8269790777bcf50b582f;p=xonotic%2Fxonotic-data.pk3dir.git Resize waypoints like everything else when viewsize is < 100; it closes #1430 --- diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 7e5f79317..e7a33567b 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -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; { diff --git a/qcsrc/common/turrets/cl_turrets.qc b/qcsrc/common/turrets/cl_turrets.qc index a893b3e8a..c21e327d4 100644 --- a/qcsrc/common/turrets/cl_turrets.qc +++ b/qcsrc/common/turrets/cl_turrets.qc @@ -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; {