Replace `vector_[xyz]` with `vector.[xyz]` where possible
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 25 Jan 2015 11:27:23 +0000 (22:27 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 25 Jan 2015 11:27:23 +0000 (22:27 +1100)
161 files changed:
qcsrc/client/View.qc
qcsrc/client/casings.qc
qcsrc/client/command/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/effects.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/movetypes.qc
qcsrc/client/particles.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/teamradar.qc
qcsrc/client/tturrets.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/waypointsprites.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/animdecide.qc
qcsrc/common/constants.qh
qcsrc/common/mapinfo.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/nades.qc
qcsrc/common/util.qc
qcsrc/common/weapons/calculations.qc
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/common/weapons/w_tuba.qc
qcsrc/common/weapons/w_vortex.qc
qcsrc/common/weapons/weapons.qc
qcsrc/csqcmodellib/cl_player.qc
qcsrc/csqcmodellib/interpolate.qc
qcsrc/dpdefs/csprogsdefs.qc
qcsrc/dpdefs/dpextensions.qc
qcsrc/menu/draw.qc
qcsrc/menu/draw.qh
qcsrc/menu/item/borderimage.qc
qcsrc/menu/item/button.qc
qcsrc/menu/item/container.qc
qcsrc/menu/item/dialog.qc
qcsrc/menu/item/image.qc
qcsrc/menu/item/inputbox.qc
qcsrc/menu/item/inputcontainer.qc
qcsrc/menu/item/label.qc
qcsrc/menu/item/listbox.qc
qcsrc/menu/item/modalcontroller.qc
qcsrc/menu/item/nexposee.qc
qcsrc/menu/item/slider.qc
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/campaign.qc
qcsrc/menu/xonotic/charmap.qc
qcsrc/menu/xonotic/colorpicker.qc
qcsrc/menu/xonotic/colorpicker_string.qc
qcsrc/menu/xonotic/credits.qc
qcsrc/menu/xonotic/crosshairbutton.qc
qcsrc/menu/xonotic/cvarlist.qc
qcsrc/menu/xonotic/demolist.qc
qcsrc/menu/xonotic/gametypelist.qc
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/languagelist.qc
qcsrc/menu/xonotic/listbox.qc
qcsrc/menu/xonotic/maplist.qc
qcsrc/menu/xonotic/playerlist.qc
qcsrc/menu/xonotic/playermodel.qc
qcsrc/menu/xonotic/playlist.qc
qcsrc/menu/xonotic/screenshotimage.qc
qcsrc/menu/xonotic/screenshotlist.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/skinlist.qc
qcsrc/menu/xonotic/slider_resolution.qc
qcsrc/menu/xonotic/soundlist.qc
qcsrc/menu/xonotic/statslist.qc
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/weaponslist.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/csqceffects.qc
qcsrc/server/ent_cs.qc
qcsrc/server/func_breakable.qc
qcsrc/server/g_casings.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_violence.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/movelib.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/gamemode_race.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_multijump.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_spawn_near_teammate.qc
qcsrc/server/mutators/mutator_touchexplode.qc
qcsrc/server/mutators/sandbox.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib/costs.qc
qcsrc/server/pathlib/expandnode.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/utility.qc
qcsrc/server/portals.qc
qcsrc/server/race.qc
qcsrc/server/scores.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/steerlib.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/target_music.qc
qcsrc/server/target_spawn.qc
qcsrc/server/tturrets/system/system_aimprocs.qc
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/system/system_misc.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_hk.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/waypointsprites.qc
qcsrc/server/weapons/csqcprojectile.qc
qcsrc/server/weapons/hitplot.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponstats.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/warpzonelib/anglestransform.qc
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/mathlib.qc
qcsrc/warpzonelib/server.qc

index 59382a8..b87cef4 100644 (file)
@@ -47,7 +47,7 @@ void Porto_Draw()
                        continue;
                ++portal_number;
                ang = vectoangles2(trace_plane_normal, dir);
-               ang_x = -ang_x;
+               ang_x = -ang.x;
                makevectors(ang);
                if(!CheckWireframeBox(porto, p - 48 * v_right - 48 * v_up + 16 * v_forward, 96 * v_right, 96 * v_up, 96 * v_forward))
                        return;
@@ -202,8 +202,8 @@ vector GetCurrentFov(float fov)
 vector GetOrthoviewFOV(vector ov_worldmin, vector ov_worldmax, vector ov_mid, vector ov_org)
 {
        float fovx, fovy;
-       float width = (ov_worldmax_x - ov_worldmin_x);
-       float height = (ov_worldmax_y - ov_worldmin_y);
+       float width = (ov_worldmax.x - ov_worldmin.x);
+       float height = (ov_worldmax.y - ov_worldmin.y);
        float distance_to_middle_of_world = vlen(ov_mid - ov_org);
        fovx = atan2(width/2, distance_to_middle_of_world) / M_PI * 360.0;
        fovy = atan2(height/2, distance_to_middle_of_world) / M_PI * 360.0;
@@ -328,16 +328,16 @@ float TrueAimCheck()
        if(vlen(trueaimpoint - traceorigin) < g_trueaim_minrange)
                trueaimpoint = traceorigin + view_forward * g_trueaim_minrange;
 
-       if(vecs_x > 0)
-               vecs_y = -vecs_y;
+       if(vecs.x > 0)
+               vecs_y = -vecs.y;
        else
                vecs = '0 0 0';
 
-       dv = view_right * vecs_y + view_up * vecs_z;
+       dv = view_right * vecs.y + view_up * vecs.z;
        w_shotorg = traceorigin + dv;
 
        // now move the vecs forward as much as requested if possible
-       tracebox(w_shotorg, mi, ma, w_shotorg + view_forward * (vecs_x + nudge), MOVE_NORMAL, ta); // FIXME this MOVE_NORMAL part will misbehave a little in csqc
+       tracebox(w_shotorg, mi, ma, w_shotorg + view_forward * (vecs.x + nudge), MOVE_NORMAL, ta); // FIXME this MOVE_NORMAL part will misbehave a little in csqc
        w_shotorg = trace_endpos - view_forward * nudge;
 
        tracebox(w_shotorg, mi, ma, trueaimpoint, MOVE_NORMAL, ta);
@@ -552,8 +552,8 @@ void UpdateCrosshair()
                        if(shottype == SHOTTYPE_HITWORLD)
                        {
                                v = wcross_origin - wcross_oldorigin;
-                               v_x /= vid_conwidth;
-                               v_y /= vid_conheight;
+                               v.x /= vid_conwidth;
+                               v.y /= vid_conheight;
                                if(vlen(v) > 0.01)
                                        shottype = SHOTTYPE_HITOBSTRUCTION;
                        }
@@ -708,9 +708,9 @@ void UpdateCrosshair()
                                hitindication_crosshair_size = 0;
 
                        wcross_scale += sin(hitindication_crosshair_size) * autocvar_crosshair_hitindication;
-                       wcross_color_x += sin(hitindication_crosshair_size) * hitindication_color_x;
-                       wcross_color_y += sin(hitindication_crosshair_size) * hitindication_color_y;
-                       wcross_color_z += sin(hitindication_crosshair_size) * hitindication_color_z;
+                       wcross_color.x += sin(hitindication_crosshair_size) * hitindication_color.x;
+                       wcross_color.y += sin(hitindication_crosshair_size) * hitindication_color.y;
+                       wcross_color.z += sin(hitindication_crosshair_size) * hitindication_color.z;
                }
 
                if(shottype == SHOTTYPE_HITENEMY)
@@ -883,10 +883,10 @@ void UpdateCrosshair()
                                }
 
                                if (autocvar_crosshair_ring_inner && ring_inner_value) // lets draw a ring inside a ring so you can ring while you ring
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, wcross_alpha * ring_inner_alpha, DRAWFLAG_ADDITIVE);
+                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, wcross_alpha * ring_inner_alpha, DRAWFLAG_ADDITIVE);
 
                                if (ring_value)
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
+                                       DrawCircleClippedPic(wcross_origin, wcross_size.x * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
                        }
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
@@ -906,7 +906,7 @@ void UpdateCrosshair()
                        while(0)
 
 #define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \
-                       drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+                       drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size.x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size.y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
 
 #define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \
                        CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
@@ -1008,8 +1008,8 @@ void CSQC_UpdateView(float w, float h)
 
        vf_size = getpropertyvec(VF_SIZE);
        vf_min = getpropertyvec(VF_MIN);
-       vid_width = vf_size_x;
-       vid_height = vf_size_y;
+       vid_width = vf_size.x;
+       vid_height = vf_size.y;
 
        vector reticle_pos = '0 0 0', reticle_size = '0 0 0';
        vector splash_pos = '0 0 0', splash_size = '0 0 0';
@@ -1061,9 +1061,9 @@ void CSQC_UpdateView(float w, float h)
                        // detect maximum viewoffset and use it
                        if(autocvar_cl_eventchase_viewoffset)
                        {
-                               WarpZone_TraceLine(current_view_origin, current_view_origin + autocvar_cl_eventchase_viewoffset + ('0 0 1' * autocvar_cl_eventchase_maxs_z), MOVE_WORLDONLY, self);
+                               WarpZone_TraceLine(current_view_origin, current_view_origin + autocvar_cl_eventchase_viewoffset + ('0 0 1' * autocvar_cl_eventchase_maxs.z), MOVE_WORLDONLY, self);
                                if(trace_fraction == 1) { current_view_origin += autocvar_cl_eventchase_viewoffset; }
-                               else { current_view_origin_z += max(0, (trace_endpos_z - current_view_origin_z) - autocvar_cl_eventchase_maxs_z); }
+                               else { current_view_origin.z += max(0, (trace_endpos.z - current_view_origin.z) - autocvar_cl_eventchase_maxs.z); }
                        }
 
                        // We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
@@ -1087,7 +1087,7 @@ void CSQC_UpdateView(float w, float h)
                        {
                                eventchase_target_origin = (current_view_origin - (v_forward * eventchase_current_distance));
                                WarpZone_TraceLine(current_view_origin, eventchase_target_origin, MOVE_WORLDONLY, self);
-                               setproperty(VF_ORIGIN, (trace_endpos - (v_forward * autocvar_cl_eventchase_mins_z)));
+                               setproperty(VF_ORIGIN, (trace_endpos - (v_forward * autocvar_cl_eventchase_mins.z)));
                        }
                        else { setproperty(VF_ORIGIN, trace_endpos); }
 
@@ -1132,30 +1132,30 @@ void CSQC_UpdateView(float w, float h)
                ov_worldmin = mi_picmin;
                ov_worldmax = mi_picmax;
 
-               float ov_width = (ov_worldmax_x - ov_worldmin_x);
-               float ov_height = (ov_worldmax_y - ov_worldmin_y);
+               float ov_width = (ov_worldmax.x - ov_worldmin.x);
+               float ov_height = (ov_worldmax.y - ov_worldmin.y);
                float ov_distance = (max(vid_width, vid_height) * max(ov_width, ov_height));
 
                ov_mid = ((ov_worldmax + ov_worldmin) * 0.5);
-               ov_org = vec3(ov_mid_x, ov_mid_y, (ov_mid_z + ov_distance));
+               ov_org = vec3(ov_mid.x, ov_mid.y, (ov_mid.z + ov_distance));
 
                float ov_nearest = vlen(ov_org - vec3(
-                       bound(ov_worldmin_x, ov_org_x, ov_worldmax_x),
-                       bound(ov_worldmin_y, ov_org_y, ov_worldmax_y),
-                       bound(ov_worldmin_z, ov_org_z, ov_worldmax_z)
+                       bound(ov_worldmin.x, ov_org.x, ov_worldmax.x),
+                       bound(ov_worldmin.y, ov_org.y, ov_worldmax.y),
+                       bound(ov_worldmin.z, ov_org.z, ov_worldmax.z)
                ));
 
                float ov_furthest = 0;
                float dist = 0;
 
-               if((dist = vlen(vec3(ov_worldmin_x, ov_worldmin_y, ov_worldmin_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmax_x, ov_worldmin_y, ov_worldmin_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmin_x, ov_worldmax_y, ov_worldmin_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmin_x, ov_worldmin_y, ov_worldmax_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmax_x, ov_worldmax_y, ov_worldmin_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmin_x, ov_worldmax_y, ov_worldmax_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmax_x, ov_worldmin_y, ov_worldmax_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
-               if((dist = vlen(vec3(ov_worldmax_x, ov_worldmax_y, ov_worldmax_z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmin.x, ov_worldmin.y, ov_worldmin.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmax.x, ov_worldmin.y, ov_worldmin.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmin.x, ov_worldmax.y, ov_worldmin.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmin.x, ov_worldmin.y, ov_worldmax.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmax.x, ov_worldmax.y, ov_worldmin.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmin.x, ov_worldmax.y, ov_worldmax.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmax.x, ov_worldmin.y, ov_worldmax.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
+               if((dist = vlen(vec3(ov_worldmax.x, ov_worldmax.y, ov_worldmax.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
 
                cvar_settemp("r_nearclip", ftos(ov_nearest));
                cvar_settemp("r_farclip_base", ftos(ov_furthest));
@@ -1454,8 +1454,8 @@ void CSQC_UpdateView(float w, float h)
                        {
                                reticle_size_x = max(vid_conwidth, vid_conheight);
                                reticle_size_y = max(vid_conwidth, vid_conheight);
-                               reticle_pos_x = (vid_conwidth - reticle_size_x) / 2;
-                               reticle_pos_y = (vid_conheight - reticle_size_y) / 2;
+                               reticle_pos_x = (vid_conwidth - reticle_size.x) / 2;
+                               reticle_pos_y = (vid_conheight - reticle_size.y) / 2;
                        }
 
                        if(zoomscript_caught)
@@ -1548,8 +1548,8 @@ void CSQC_UpdateView(float w, float h)
        {
                splash_size_x = max(vid_conwidth, vid_conheight);
                splash_size_y = max(vid_conwidth, vid_conheight);
-               splash_pos_x = (vid_conwidth - splash_size_x) / 2;
-               splash_pos_y = (vid_conheight - splash_size_y) / 2;
+               splash_pos_x = (vid_conwidth - splash_size.x) / 2;
+               splash_pos_y = (vid_conheight - splash_size.y) / 2;
 
                float myhealth_flash_temp;
                myhealth = getstati(STAT_HEALTH);
@@ -1639,10 +1639,10 @@ void CSQC_UpdateView(float w, float h)
                if(cvar("r_glsl_postprocess_uservec2_enable") != e2) { cvar_set("r_glsl_postprocess_uservec2_enable", ftos(e2)); }
 
                // blur postprocess handling done first (used by hud_damage and hud_contents)
-               if((damage_blurpostprocess_x || content_blurpostprocess_x))
+               if((damage_blurpostprocess.x || content_blurpostprocess.x))
                {
-                       float blurradius = bound(0, damage_blurpostprocess_y + content_blurpostprocess_y, autocvar_hud_postprocessing_maxblurradius);
-                       float bluralpha = bound(0, damage_blurpostprocess_z + content_blurpostprocess_z, autocvar_hud_postprocessing_maxbluralpha);
+                       float blurradius = bound(0, damage_blurpostprocess.y + content_blurpostprocess.y, autocvar_hud_postprocessing_maxblurradius);
+                       float bluralpha = bound(0, damage_blurpostprocess.z + content_blurpostprocess.z, autocvar_hud_postprocessing_maxbluralpha);
                        if(blurradius != old_blurradius || bluralpha != old_bluralpha) // reduce cvar_set spam as much as possible
                        {
                                cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(blurradius), " ", ftos(bluralpha), " 0 0"));
@@ -1794,9 +1794,9 @@ void CSQC_Demo_Camera()
                camera_offset = '0 0 0';
                current_angles = '0 0 0';
                camera_direction = '0 0 0';
-               camera_offset_z += 30;
-               camera_offset_x += 30 * -cos(current_angles_y * DEG2RAD);
-               camera_offset_y += 30 * -sin(current_angles_y * DEG2RAD);
+               camera_offset.z += 30;
+               camera_offset.x += 30 * -cos(current_angles.y * DEG2RAD);
+               camera_offset.y += 30 * -sin(current_angles.y * DEG2RAD);
                current_origin = view_origin;
                current_camera_offset  = camera_offset;
                cvar_set("camera_reset", "0");
@@ -1805,7 +1805,7 @@ void CSQC_Demo_Camera()
 
        // Camera angles
        if( camera_roll )
-               mouse_angles_z += camera_roll * autocvar_camera_speed_roll;
+               mouse_angles.z += camera_roll * autocvar_camera_speed_roll;
 
        if(autocvar_camera_look_player)
        {
@@ -1813,9 +1813,9 @@ void CSQC_Demo_Camera()
                float n;
 
                dir = normalize(view_origin - current_position);
-               n = mouse_angles_z;
+               n = mouse_angles.z;
                mouse_angles = vectoangles(dir);
-               mouse_angles_x = mouse_angles_x * -1;
+               mouse_angles_x = mouse_angles.x * -1;
                mouse_angles_z = n;
        }
        else
@@ -1823,21 +1823,21 @@ void CSQC_Demo_Camera()
                tmp = getmousepos() * 0.1;
                if(vlen(tmp)>autocvar_camera_mouse_threshold)
                {
-                       mouse_angles_x += tmp_y * cos(mouse_angles_z * DEG2RAD) + (tmp_x * sin(mouse_angles_z * DEG2RAD));
-                       mouse_angles_y -= tmp_x * cos(mouse_angles_z * DEG2RAD) + (tmp_y * -sin(mouse_angles_z * DEG2RAD));
+                       mouse_angles.x += tmp.y * cos(mouse_angles.z * DEG2RAD) + (tmp.x * sin(mouse_angles.z * DEG2RAD));
+                       mouse_angles.y -= tmp.x * cos(mouse_angles.z * DEG2RAD) + (tmp.y * -sin(mouse_angles.z * DEG2RAD));
                }
        }
 
-       while (mouse_angles_x < -180) mouse_angles_x = mouse_angles_x + 360;
-       while (mouse_angles_x > 180) mouse_angles_x = mouse_angles_x - 360;
-       while (mouse_angles_y < -180) mouse_angles_y = mouse_angles_y + 360;
-       while (mouse_angles_y > 180) mouse_angles_y = mouse_angles_y - 360;
+       while (mouse_angles.x < -180) mouse_angles_x = mouse_angles.x + 360;
+       while (mouse_angles.x > 180) mouse_angles_x = mouse_angles.x - 360;
+       while (mouse_angles.y < -180) mouse_angles_y = mouse_angles.y + 360;
+       while (mouse_angles.y > 180) mouse_angles_y = mouse_angles.y - 360;
 
        // Fix difference when angles don't have the same sign
        delta = '0 0 0';
-       if(mouse_angles_y < -60 && current_angles_y > 60)
+       if(mouse_angles.y < -60 && current_angles.y > 60)
                delta = '0 360 0';
-       if(mouse_angles_y > 60 && current_angles_y < -60)
+       if(mouse_angles.y > 60 && current_angles.y < -60)
                delta = '0 -360 0';
 
        if(autocvar_camera_look_player)
@@ -1848,35 +1848,35 @@ void CSQC_Demo_Camera()
        attenuation = 1 / max(1, attenuation);
        current_angles += (mouse_angles - current_angles + delta) * attenuation;
 
-       while (current_angles_x < -180) current_angles_x = current_angles_x + 360;
-       while (current_angles_x > 180) current_angles_x = current_angles_x - 360;
-       while (current_angles_y < -180) current_angles_y = current_angles_y + 360;
-       while (current_angles_y > 180) current_angles_y = current_angles_y - 360;
+       while (current_angles.x < -180) current_angles_x = current_angles.x + 360;
+       while (current_angles.x > 180) current_angles_x = current_angles.x - 360;
+       while (current_angles.y < -180) current_angles_y = current_angles.y + 360;
+       while (current_angles.y > 180) current_angles_y = current_angles.y - 360;
 
        // Camera position
        tmp = '0 0 0';
        dimensions = 0;
 
-       if( camera_direction_x )
+       if( camera_direction.x )
        {
-               tmp_x = camera_direction_x * cos(current_angles_y * DEG2RAD);
-               tmp_y = camera_direction_x * sin(current_angles_y * DEG2RAD);
+               tmp_x = camera_direction.x * cos(current_angles.y * DEG2RAD);
+               tmp_y = camera_direction.x * sin(current_angles.y * DEG2RAD);
                if( autocvar_camera_forward_follows && !autocvar_camera_look_player )
-                       tmp_z = camera_direction_x * -sin(current_angles_x * DEG2RAD);
+                       tmp_z = camera_direction.x * -sin(current_angles.x * DEG2RAD);
                ++dimensions;
        }
 
-       if( camera_direction_y )
+       if( camera_direction.y )
        {
-               tmp_x += camera_direction_y * -sin(current_angles_y * DEG2RAD);
-               tmp_y += camera_direction_y * cos(current_angles_y * DEG2RAD) * cos(current_angles_z * DEG2RAD);
-               tmp_z += camera_direction_y * sin(current_angles_z * DEG2RAD);
+               tmp.x += camera_direction.y * -sin(current_angles.y * DEG2RAD);
+               tmp.y += camera_direction.y * cos(current_angles.y * DEG2RAD) * cos(current_angles.z * DEG2RAD);
+               tmp.z += camera_direction.y * sin(current_angles.z * DEG2RAD);
                ++dimensions;
        }
 
-       if( camera_direction_z )
+       if( camera_direction.z )
        {
-               tmp_z += camera_direction_z * cos(current_angles_z * DEG2RAD);
+               tmp.z += camera_direction.z * cos(current_angles.z * DEG2RAD);
                ++dimensions;
        }
 
index 02e0600..d97e995 100644 (file)
@@ -66,7 +66,7 @@ void Casing_Touch()
 
 void Casing_Damage(float thisdmg, int hittype, vector org, vector thisforce)
 {
-       if(thisforce_z < 0)
+       if(thisforce.z < 0)
                thisforce_z = 0;
        self.move_velocity = self.move_velocity + thisforce + '0 0 100';
        self.move_flags &= ~FL_ONGROUND;
index 4fad336..dbece27 100644 (file)
@@ -121,8 +121,8 @@ void LocalCommand_create_scrshot_ent(int request)
                        {
                                fputs(fh, "{\n");
                                fputs(fh, strcat("\"classname\" \"info_autoscreenshot\"\n"));
-                               fputs(fh, strcat("\"origin\" \"", strcat(ftos(view_origin_x), " ", ftos(view_origin_y), " ", ftos(view_origin_z)), "\"\n"));
-                               fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles_x), " ", ftos(view_angles_y), " ", ftos(view_angles_z)), "\"\n"));
+                               fputs(fh, strcat("\"origin\" \"", strcat(ftos(view_origin.x), " ", ftos(view_origin.y), " ", ftos(view_origin.z)), "\"\n"));
+                               fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles.x), " ", ftos(view_angles.y), " ", ftos(view_angles.z)), "\"\n"));
                                fputs(fh, "}\n");
 
                                print("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
@@ -524,18 +524,18 @@ void GameCommand(string command)
        /* nothing */
 
 #define CONSOLE_COMMANDS_MOVEMENT \
-       CONSOLE_COMMAND("+forward", { ++camera_direction_x; }) \
-       CONSOLE_COMMAND("-forward", { --camera_direction_x; }) \
-       CONSOLE_COMMAND("+back", { --camera_direction_x; }) \
-       CONSOLE_COMMAND("-back", { ++camera_direction_x; }) \
-       CONSOLE_COMMAND("+moveup", { ++camera_direction_z; }) \
-       CONSOLE_COMMAND("-moveup", { --camera_direction_z; }) \
-       CONSOLE_COMMAND("+movedown", { --camera_direction_z; }) \
-       CONSOLE_COMMAND("-movedown", { ++camera_direction_z; }) \
-       CONSOLE_COMMAND("+moveright", { --camera_direction_y; }) \
-       CONSOLE_COMMAND("-moveright", { ++camera_direction_y; }) \
-       CONSOLE_COMMAND("+moveleft", { ++camera_direction_y; }) \
-       CONSOLE_COMMAND("-moveleft", { --camera_direction_y; }) \
+       CONSOLE_COMMAND("+forward", { ++camera_direction.x; }) \
+       CONSOLE_COMMAND("-forward", { --camera_direction.x; }) \
+       CONSOLE_COMMAND("+back", { --camera_direction.x; }) \
+       CONSOLE_COMMAND("-back", { ++camera_direction.x; }) \
+       CONSOLE_COMMAND("+moveup", { ++camera_direction.z; }) \
+       CONSOLE_COMMAND("-moveup", { --camera_direction.z; }) \
+       CONSOLE_COMMAND("+movedown", { --camera_direction.z; }) \
+       CONSOLE_COMMAND("-movedown", { ++camera_direction.z; }) \
+       CONSOLE_COMMAND("+moveright", { --camera_direction.y; }) \
+       CONSOLE_COMMAND("-moveright", { ++camera_direction.y; }) \
+       CONSOLE_COMMAND("+moveleft", { ++camera_direction.y; }) \
+       CONSOLE_COMMAND("-moveleft", { --camera_direction.y; }) \
        CONSOLE_COMMAND("+roll_right", { ++camera_roll; }) \
        CONSOLE_COMMAND("-roll_right", { --camera_roll; }) \
        CONSOLE_COMMAND("+roll_left", { --camera_roll; }) \
index 81eefe6..715a05c 100644 (file)
@@ -280,9 +280,9 @@ void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer)
                        self.colormap = 0;
 
                        self.glowmod = self.old_glowmod * bound(0, 1 - (time - self.death_time) / autocvar_cl_deathglow, 1);
-                       self.glowmod_x = max(self.glowmod_x, 0.0001);
-                       self.glowmod_y = max(self.glowmod_y, 0.0001);
-                       self.glowmod_z = max(self.glowmod_z, 0.0001);
+                       self.glowmod_x = max(self.glowmod.x, 0.0001);
+                       self.glowmod_y = max(self.glowmod.y, 0.0001);
+                       self.glowmod_z = max(self.glowmod.z, 0.0001);
                }
                else if(self.old_glowmod != '0 0 0') { self.old_glowmod = '0 0 0'; }
        }
index a515fdb..56c83e0 100644 (file)
@@ -75,7 +75,7 @@ void Net_ReadLightningarc()
        vector from, to;
 
     from_x = ReadCoord(); from_y = ReadCoord(); from_z = ReadCoord();
-    to_x   = ReadCoord(); to_y   = ReadCoord(); to_z   = ReadCoord();
+    to_x = ReadCoord(); to_y = ReadCoord(); to_z = ReadCoord();
 
     if(autocvar_cl_effects_lightningarc_simple)
     {
index ec8029f..a537cba 100644 (file)
@@ -86,7 +86,7 @@ void Draw_GrapplingHook()
                {
                        default:
                        case ENT_CLIENT_HOOK:
-                               a = view_origin + view_forward * vs_x + view_right * -vs_y + view_up * vs_z;
+                               a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
                                b = self.origin;
                                break;
                        case ENT_CLIENT_ARC_BEAM:
@@ -96,7 +96,7 @@ void Draw_GrapplingHook()
                                        b = view_origin + view_forward * vlen(self.velocity - self.origin); // honor original length of beam!
                                WarpZone_TraceLine(view_origin, b, MOVE_NORMAL, world);
                                b = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-                               a = view_origin + view_forward * vs_x + view_right * -vs_y + view_up * vs_z;
+                               a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
                                break;
                }
        }
index 067770c..e189ff9 100644 (file)
@@ -14,7 +14,7 @@ Misc HUD functions
 //   1/4 height: bottom part
 void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha, vector theBorderSize)
 {
-    if (theBorderSize_x < 0 && theBorderSize_y < 0) // draw whole image as it is
+    if (theBorderSize.x < 0 && theBorderSize.y < 0) // draw whole image as it is
     {
                drawpic(theOrigin, pic, theSize, theColor, theAlpha, 0);
                return;
@@ -30,16 +30,16 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
        vector width, height;
        vector bW, bH;
        //pic = draw_UseSkinFor(pic);
-       width = eX * theSize_x;
-       height = eY * theSize_y;
-       if(theSize_x <= theBorderSize_x * 2)
+       width = eX * theSize.x;
+       height = eY * theSize.y;
+       if(theSize.x <= theBorderSize.x * 2)
        {
                // not wide enough... draw just left and right then
-               bW = eX * (0.25 * theSize_x / (theBorderSize_x * 2));
-               if(theSize_y <= theBorderSize_y * 2)
+               bW = eX * (0.25 * theSize.x / (theBorderSize.x * 2));
+               if(theSize.y <= theBorderSize.y * 2)
                {
                        // not high enough... draw just corners
-                       bH = eY * (0.25 * theSize_y / (theBorderSize_y * 2));
+                       bH = eY * (0.25 * theSize.y / (theBorderSize.y * 2));
                        drawsubpic(theOrigin,                 width * 0.5 + height * 0.5, pic, '0 0 0',           bW + bH, theColor, theAlpha, 0);
                        drawsubpic(theOrigin + width   * 0.5, width * 0.5 + height * 0.5, pic, eX - bW,           bW + bH, theColor, theAlpha, 0);
                        drawsubpic(theOrigin + height  * 0.5, width * 0.5 + height * 0.5, pic, eY - bH,           bW + bH, theColor, theAlpha, 0);
@@ -47,7 +47,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
                }
                else
                {
-                       dY = theBorderSize_x * eY;
+                       dY = theBorderSize.x * eY;
                        drawsubpic(theOrigin,                             width * 0.5          +     dY, pic, '0 0    0',           '0 0.25 0' + bW, theColor, theAlpha, 0);
                        drawsubpic(theOrigin + width * 0.5,               width * 0.5          +     dY, pic, '0 0    0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
                        drawsubpic(theOrigin                        + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0',           '0 0.5  0' + bW, theColor, theAlpha, 0);
@@ -58,11 +58,11 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
        }
        else
        {
-               if(theSize_y <= theBorderSize_y * 2)
+               if(theSize.y <= theBorderSize.y * 2)
                {
                        // not high enough... draw just top and bottom then
-                       bH = eY * (0.25 * theSize_y / (theBorderSize_y * 2));
-                       dX = theBorderSize_x * eX;
+                       bH = eY * (0.25 * theSize.y / (theBorderSize.y * 2));
+                       dX = theBorderSize.x * eX;
                        drawsubpic(theOrigin,                                         dX + height * 0.5, pic, '0    0 0',           '0.25 0 0' + bH, theColor, theAlpha, 0);
                        drawsubpic(theOrigin + dX,                        width - 2 * dX + height * 0.5, pic, '0.25 0 0',           '0.5  0 0' + bH, theColor, theAlpha, 0);
                        drawsubpic(theOrigin + width - dX,                            dX + height * 0.5, pic, '0.75 0 0',           '0.25 0 0' + bH, theColor, theAlpha, 0);
@@ -72,8 +72,8 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
                }
                else
                {
-                       dX = theBorderSize_x * eX;
-                       dY = theBorderSize_x * eY;
+                       dX = theBorderSize.x * eX;
+                       dY = theBorderSize.x * eY;
                        drawsubpic(theOrigin,                                        dX          +     dY, pic, '0    0    0', '0.25 0.25 0', theColor, theAlpha, 0);
                        drawsubpic(theOrigin                  + dX,      width - 2 * dX          +     dY, pic, '0.25 0    0', '0.5  0.25 0', theColor, theAlpha, 0);
                        drawsubpic(theOrigin          + width - dX,                  dX          +     dY, pic, '0.75 0    0', '0.25 0.25 0', theColor, theAlpha, 0);
@@ -125,9 +125,9 @@ vector HUD_Get_Num_Color (float x, float maxvalue)
        blinkingamt = (1 - x/maxvalue/0.25);
        if(blinkingamt > 0)
        {
-               color_x = color_x - color_x * blinkingamt * sin(2*M_PI*time);
-               color_y = color_y - color_y * blinkingamt * sin(2*M_PI*time);
-               color_z = color_z - color_z * blinkingamt * sin(2*M_PI*time);
+               color_x = color.x - color.x * blinkingamt * sin(2*M_PI*time);
+               color_y = color.y - color.y * blinkingamt * sin(2*M_PI*time);
+               color_z = color.z - color.z * blinkingamt * sin(2*M_PI*time);
        }
        return color;
 }
@@ -144,13 +144,13 @@ float stringwidth_nocolors(string s, vector theSize)
 
 void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
 {
-       position_x -= 2 / 3 * strlen(text) * theScale_x;
+       position.x -= 2 / 3 * strlen(text) * theScale.x;
        drawstring(position, text, theScale, rgb, theAlpha, flag);
 }
 
 void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
 {
-       position_x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale_x);
+       position_x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale.x);
        drawstring(position, text, theScale, rgb, theAlpha, flag);
 }
 
@@ -291,37 +291,37 @@ void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, flo
                }
 
         if (baralign == 1) // bottom align
-                       theOrigin_y += (1 - length_ratio) * theSize_y;
+                       theOrigin.y += (1 - length_ratio) * theSize.y;
         else if (baralign == 2) // center align
-            theOrigin_y += 0.5 * (1 - length_ratio) * theSize_y;
+            theOrigin.y += 0.5 * (1 - length_ratio) * theSize.y;
         else if (baralign == 3) // center align, positive values down, negative up
                {
-                       theSize_y *= 0.5;
+                       theSize.y *= 0.5;
                        if (length_ratio > 0)
-                               theOrigin_y += theSize_y;
+                               theOrigin.y += theSize.y;
                        else
                        {
-                               theOrigin_y += (1 + length_ratio) * theSize_y;
+                               theOrigin.y += (1 + length_ratio) * theSize.y;
                                length_ratio = -length_ratio;
                        }
                }
-               theSize_y *= length_ratio;
+               theSize.y *= length_ratio;
 
                vector bH;
-               width = eX * theSize_x;
-               height = eY * theSize_y;
-               if(theSize_y <= theSize_x * 2)
+               width = eX * theSize.x;
+               height = eY * theSize.y;
+               if(theSize.y <= theSize.x * 2)
                {
                        // button not high enough
                        // draw just upper and lower part then
-                       square = eY * theSize_y * 0.5;
-                       bH = eY * (0.25 * theSize_y / (theSize_x * 2));
+                       square = eY * theSize.y * 0.5;
+                       bH = eY * (0.25 * theSize.y / (theSize.x * 2));
                        drawsubpic(theOrigin,          square + width, pic, '0 0 0', eX + bH, theColor, theAlpha, drawflag);
                        drawsubpic(theOrigin + square, square + width, pic, eY - bH, eX + bH, theColor, theAlpha, drawflag);
                }
                else
                {
-                       square = eY * theSize_x;
+                       square = eY * theSize.x;
                        drawsubpic(theOrigin,                   width   +     square, pic, '0 0    0', '1 0.25 0', theColor, theAlpha, drawflag);
                        drawsubpic(theOrigin +          square, theSize - 2 * square, pic, '0 0.25 0', '1 0.5  0', theColor, theAlpha, drawflag);
                        drawsubpic(theOrigin + height - square, width   +     square, pic, '0 0.75 0', '1 0.25 0', theColor, theAlpha, drawflag);
@@ -333,37 +333,37 @@ void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, flo
                }
 
                if (baralign == 1) // right align
-                       theOrigin_x += (1 - length_ratio) * theSize_x;
+                       theOrigin.x += (1 - length_ratio) * theSize.x;
         else if (baralign == 2) // center align
-            theOrigin_x += 0.5 * (1 - length_ratio) * theSize_x;
+            theOrigin.x += 0.5 * (1 - length_ratio) * theSize.x;
         else if (baralign == 3) // center align, positive values on the right, negative on the left
                {
-                       theSize_x *= 0.5;
+                       theSize.x *= 0.5;
                        if (length_ratio > 0)
-                               theOrigin_x += theSize_x;
+                               theOrigin.x += theSize.x;
                        else
                        {
-                               theOrigin_x += (1 + length_ratio) * theSize_x;
+                               theOrigin.x += (1 + length_ratio) * theSize.x;
                                length_ratio = -length_ratio;
                        }
                }
-               theSize_x *= length_ratio;
+               theSize.x *= length_ratio;
 
                vector bW;
-               width = eX * theSize_x;
-               height = eY * theSize_y;
-               if(theSize_x <= theSize_y * 2)
+               width = eX * theSize.x;
+               height = eY * theSize.y;
+               if(theSize.x <= theSize.y * 2)
                {
                        // button not wide enough
                        // draw just left and right part then
-                       square = eX * theSize_x * 0.5;
-                       bW = eX * (0.25 * theSize_x / (theSize_y * 2));
+                       square = eX * theSize.x * 0.5;
+                       bW = eX * (0.25 * theSize.x / (theSize.y * 2));
                        drawsubpic(theOrigin,          square + height, pic, '0 0 0', eY + bW, theColor, theAlpha, drawflag);
                        drawsubpic(theOrigin + square, square + height, pic, eX - bW, eY + bW, theColor, theAlpha, drawflag);
                }
                else
                {
-                       square = eX * theSize_y;
+                       square = eX * theSize.y;
                        drawsubpic(theOrigin,                  height  +     square, pic, '0    0 0', '0.25 1 0', theColor, theAlpha, drawflag);
                        drawsubpic(theOrigin +         square, theSize - 2 * square, pic, '0.25 0 0', '0.5  1 0', theColor, theAlpha, drawflag);
                        drawsubpic(theOrigin + width - square, height  +     square, pic, '0.75 0 0', '0.25 1 0', theColor, theAlpha, drawflag);
@@ -382,10 +382,10 @@ void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theA
                pic = "gfx/hud/default/num_leading";
        }
 
-       drawsubpic(pos, eX * min(mySize_x * 0.5, mySize_y) + eY * mySize_y, pic, '0 0 0', '0.25 1 0', color, theAlpha, drawflag);
-       if(mySize_x/mySize_y > 2)
-               drawsubpic(pos + eX * mySize_y, eX * (mySize_x - 2 * mySize_y) + eY * mySize_y, pic, '0.25 0 0', '0.5 1 0', color, theAlpha, drawflag);
-       drawsubpic(pos + eX * mySize_x - eX * min(mySize_x * 0.5, mySize_y), eX * min(mySize_x * 0.5, mySize_y) + eY * mySize_y, pic, '0.75 0 0', '0.25 1 0', color, theAlpha, drawflag);
+       drawsubpic(pos, eX * min(mySize.x * 0.5, mySize.y) + eY * mySize.y, pic, '0 0 0', '0.25 1 0', color, theAlpha, drawflag);
+       if(mySize.x/mySize.y > 2)
+               drawsubpic(pos + eX * mySize.y, eX * (mySize.x - 2 * mySize.y) + eY * mySize.y, pic, '0.25 0 0', '0.5 1 0', color, theAlpha, drawflag);
+       drawsubpic(pos + eX * mySize.x - eX * min(mySize.x * 0.5, mySize.y), eX * min(mySize.x * 0.5, mySize.y) + eY * mySize.y, pic, '0.75 0 0', '0.25 1 0', color, theAlpha, drawflag);
 }
 
 // Weapon icons (#0)
@@ -413,7 +413,8 @@ void HUD_Weapons(void)
        // declarations
        WepSet weapons_stat = WepSet_GetFromStat();
        float i, f, a;
-       float screen_ar, center_x = 0, center_y;
+       float screen_ar;
+       vector center = '0 0 0';
        float weapon_count, weapon_id;
        float row, column, rows = 0, columns = 0;
        float aspect = autocvar_hud_panel_weapons_aspect;
@@ -425,7 +426,7 @@ void HUD_Weapons(void)
        float timeout_effect_length = autocvar_hud_panel_weapons_timeout_speed_out; //? 0.75 : 0);
 
        float ammo_full;
-       float barsize_x = 0, barsize_y = 0, baroffset_x = 0, baroffset_y = 0;
+       vector barsize = '0 0 0', baroffset = '0 0 0';
        vector ammo_color = '1 0 1';
        float ammo_alpha = 1;
 
@@ -521,16 +522,16 @@ void HUD_Weapons(void)
                vector max_panel_size = panel_size - '2 2 0' * panel_bg_padding;
 
                // calculate distribution and size of table cells
-               if(max_panel_size_x > max_panel_size_y)
+               if(max_panel_size.x > max_panel_size.y)
                {
                        while(weapon_count > columns * rows)
                        {
                                ++rows;
-                               columns = ceil(max_panel_size_x / (max_panel_size_y / rows * aspect));
+                               columns = ceil(max_panel_size.x / (max_panel_size.y / rows * aspect));
                        }
 
-                       weapon_size_x = max_panel_size_x / columns;
-                       weapon_size_y = max_panel_size_y / rows;
+                       weapon_size_x = max_panel_size.x / columns;
+                       weapon_size_y = max_panel_size.y / rows;
                        columns = ceil(weapon_count / rows);
                }
                else
@@ -538,19 +539,19 @@ void HUD_Weapons(void)
                        while(weapon_count > columns * rows)
                        {
                                ++columns;
-                               rows = ceil(max_panel_size_y / (max_panel_size_x / columns / aspect));
+                               rows = ceil(max_panel_size.y / (max_panel_size.x / columns / aspect));
                        }
 
-                       weapon_size_x = max_panel_size_x / columns;
-                       weapon_size_y = max_panel_size_y / rows;
+                       weapon_size_x = max_panel_size.x / columns;
+                       weapon_size_y = max_panel_size.y / rows;
                        rows = ceil(weapon_count / columns);
                }
 
                // reduce size of the panel
-               panel_size_x = columns * weapon_size_x;
-               panel_size_y = rows * weapon_size_y;
-               panel_pos_x += (max_panel_size_x - panel_size_x) / 2;
-               panel_pos_y += (max_panel_size_y - panel_size_y) / 2;
+               panel_size_x = columns * weapon_size.x;
+               panel_size_y = rows * weapon_size.y;
+               panel_pos.x += (max_panel_size.x - panel_size.x) / 2;
+               panel_pos.y += (max_panel_size.y - panel_size.y) / 2;
 
                panel_size += '2 2 0' * panel_bg_padding;
        }
@@ -580,22 +581,22 @@ void HUD_Weapons(void)
                        if (autocvar_hud_panel_weapons_timeout_effect == 2 || autocvar_hud_panel_weapons_timeout_effect == 3)
                        {
                                f *= f; // for a cooler movement
-                               center_x = panel_pos_x + panel_size_x/2;
-                               center_y = panel_pos_y + panel_size_y/2;
+                               center_x = panel_pos.x + panel_size.x/2;
+                               center_y = panel_pos.y + panel_size.y/2;
                                screen_ar = vid_conwidth/vid_conheight;
-                               if (center_x/center_y < screen_ar) //bottom left
+                               if (center.x/center.y < screen_ar) //bottom left
                                {
-                                       if ((vid_conwidth - center_x)/center_y < screen_ar) //bottom
-                                               panel_pos_y += f * (vid_conheight - panel_pos_y);
+                                       if ((vid_conwidth - center.x)/center.y < screen_ar) //bottom
+                                               panel_pos.y += f * (vid_conheight - panel_pos.y);
                                        else //left
-                                               panel_pos_x -= f * (panel_pos_x + panel_size_x);
+                                               panel_pos.x -= f * (panel_pos.x + panel_size.x);
                                }
                                else //top right
                                {
-                                       if ((vid_conwidth - center_x)/center_y < screen_ar) //right
-                                               panel_pos_x += f * (vid_conwidth - panel_pos_x);
+                                       if ((vid_conwidth - center.x)/center.y < screen_ar) //right
+                                               panel_pos.x += f * (vid_conwidth - panel_pos.x);
                                        else //top
-                                               panel_pos_y -= f * (panel_pos_y + panel_size_y);
+                                               panel_pos.y -= f * (panel_pos.y + panel_size.y);
                                }
                                if(f == 1)
                                        center_x = -1; // mark the panel as off screen
@@ -623,22 +624,22 @@ void HUD_Weapons(void)
                        {
                                f *= f; // for a cooler movement
                                f = 1 - f;
-                               center_x = panel_pos_x + panel_size_x/2;
-                               center_y = panel_pos_y + panel_size_y/2;
+                               center_x = panel_pos.x + panel_size.x/2;
+                               center_y = panel_pos.y + panel_size.y/2;
                                screen_ar = vid_conwidth/vid_conheight;
-                               if (center_x/center_y < screen_ar) //bottom left
+                               if (center.x/center.y < screen_ar) //bottom left
                                {
-                                       if ((vid_conwidth - center_x)/center_y < screen_ar) //bottom
-                                               panel_pos_y += f * (vid_conheight - panel_pos_y);
+                                       if ((vid_conwidth - center.x)/center.y < screen_ar) //bottom
+                                               panel_pos.y += f * (vid_conheight - panel_pos.y);
                                        else //left
-                                               panel_pos_x -= f * (panel_pos_x + panel_size_x);
+                                               panel_pos.x -= f * (panel_pos.x + panel_size.x);
                                }
                                else //top right
                                {
-                                       if ((vid_conwidth - center_x)/center_y < screen_ar) //right
-                                               panel_pos_x += f * (vid_conwidth - panel_pos_x);
+                                       if ((vid_conwidth - center.x)/center.y < screen_ar) //right
+                                               panel_pos.x += f * (vid_conwidth - panel_pos.x);
                                        else //top
-                                               panel_pos_y -= f * (panel_pos_y + panel_size_y);
+                                               panel_pos.y -= f * (panel_pos.y + panel_size.y);
                                }
                        }
                }
@@ -663,10 +664,10 @@ void HUD_Weapons(void)
 
        if(!rows) // if rows is > 0 onlyowned code has already updated these vars
        {
-               rows = panel_size_y/panel_size_x;
+               rows = panel_size.y/panel_size.x;
                rows = bound(1, floor((sqrt(4 * aspect * rows * weapon_count + rows * rows) + rows + 0.5) / 2), weapon_count);
                columns = ceil(weapon_count/rows);
-               weapon_size = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+               weapon_size = eX * panel_size.x*(1/columns) + eY * panel_size.y*(1/rows);
        }
 
        // calculate position/size for visual bar displaying ammount of ammo status
@@ -675,17 +676,17 @@ void HUD_Weapons(void)
                ammo_color = stov(autocvar_hud_panel_weapons_ammo_color);
                ammo_alpha = panel_fg_alpha * autocvar_hud_panel_weapons_ammo_alpha;
 
-               if(weapon_size_x/weapon_size_y > aspect)
+               if(weapon_size.x/weapon_size.y > aspect)
                {
-                       barsize_x = aspect * weapon_size_y;
-                       barsize_y = weapon_size_y;
-                       baroffset_x = (weapon_size_x - barsize_x) / 2;
+                       barsize_x = aspect * weapon_size.y;
+                       barsize_y = weapon_size.y;
+                       baroffset_x = (weapon_size.x - barsize.x) / 2;
                }
                else
                {
-                       barsize_y = 1/aspect * weapon_size_x;
-                       barsize_x = weapon_size_x;
-                       baroffset_y = (weapon_size_y - barsize_y) / 2;
+                       barsize_y = 1/aspect * weapon_size.x;
+                       barsize_x = weapon_size.x;
+                       baroffset_y = (weapon_size.y - barsize.y) / 2;
                }
        }
        if(autocvar_hud_panel_weapons_accuracy)
@@ -693,7 +694,7 @@ void HUD_Weapons(void)
 
        // draw items
        row = column = 0;
-       vector label_size = '1 1 0' * min(weapon_size_x, weapon_size_y) * bound(0, autocvar_hud_panel_weapons_label_scale, 1);
+       vector label_size = '1 1 0' * min(weapon_size.x, weapon_size.y) * bound(0, autocvar_hud_panel_weapons_label_scale, 1);
        for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
        {
                // retrieve information about the current weapon to be drawn
@@ -710,8 +711,8 @@ void HUD_Weapons(void)
 
                // figure out the drawing position of weapon
                weapon_pos = (panel_pos
-                       + eX * column * weapon_size_x
-                       + eY * row * weapon_size_y);
+                       + eX * column * weapon_size.x
+                       + eY * row * weapon_size.y);
 
                // draw background behind currently selected weapon
                if(self.weapon == switchweapon)
@@ -772,10 +773,10 @@ void HUD_Weapons(void)
                                        }
 
                                        drawsetcliparea(
-                                               weapon_pos_x + baroffset_x,
-                                               weapon_pos_y + baroffset_y,
-                                               barsize_x * bound(0, a/ammo_full, 1),
-                                               barsize_y
+                                               weapon_pos.x + baroffset.x,
+                                               weapon_pos.y + baroffset.y,
+                                               barsize.x * bound(0, a/ammo_full, 1),
+                                               barsize.y
                                        );
 
                                        drawpic_aspect_skin(
@@ -839,8 +840,8 @@ void DrawNadeScoreBar(vector myPos, vector mySize, vector color)
 {
        
        HUD_Panel_DrawProgressBar(
-               myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, 
-               mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, 
+               myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x,
+               mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x,
                autocvar_hud_panel_ammo_progressbar_name, 
                getstatf(STAT_NADE_BONUS_SCORE), 0, 0, color, 
                autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -860,11 +861,11 @@ void DrawAmmoNades(vector myPos, vector mySize, float draw_expanding, float expa
        if(autocvar_hud_panel_ammo_iconalign)
        {
                numpos = myPos;
-               picpos = myPos + eX * 2 * mySize_y;
+               picpos = myPos + eX * 2 * mySize.y;
        }
        else
        {
-               numpos = myPos + eX * mySize_y;
+               numpos = myPos + eX * mySize.y;
                picpos = myPos;
        }
 
@@ -873,13 +874,13 @@ void DrawAmmoNades(vector myPos, vector mySize, float draw_expanding, float expa
        if(b > 0 || a > 0)
        {
                if(autocvar_hud_panel_ammo_text)
-                       drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
                
                if(draw_expanding)
-                       drawpic_aspect_skin_expanding(picpos, "nade_nbg", '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, expand_time);
+                       drawpic_aspect_skin_expanding(picpos, "nade_nbg", '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, expand_time);
                        
-               drawpic_aspect_skin(picpos, "nade_bg" , '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
-               drawpic_aspect_skin(picpos, "nade_nbg" , '1 1 0' * mySize_y, nade_color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(picpos, "nade_bg" , '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(picpos, "nade_nbg" , '1 1 0' * mySize.y, nade_color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
        }
 }
 
@@ -909,13 +910,13 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent,
        vector iconPos, textPos;
        if(autocvar_hud_panel_ammo_iconalign)
        {
-               iconPos = myPos + eX * 2 * mySize_y;
+               iconPos = myPos + eX * 2 * mySize.y;
                textPos = myPos;
        }
        else
        {
                iconPos = myPos;
-               textPos = myPos + eX * mySize_y;
+               textPos = myPos + eX * mySize.y;
        }
 
        float isShadowed = (ammo <= 0 && !isCurrent && !isInfinite);
@@ -947,12 +948,12 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent,
                drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
        if(ammo > 0 && autocvar_hud_panel_ammo_progressbar)
-               HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, autocvar_hud_panel_ammo_progressbar_name, ammo/autocvar_hud_panel_ammo_maxammo, 0, 0, textColor, autocvar_hud_progressbar_alpha * alpha, DRAWFLAG_NORMAL);
+               HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x, autocvar_hud_panel_ammo_progressbar_name, ammo/autocvar_hud_panel_ammo_maxammo, 0, 0, textColor, autocvar_hud_progressbar_alpha * alpha, DRAWFLAG_NORMAL);
 
        if(autocvar_hud_panel_ammo_text)
-               drawstring_aspect(textPos, text, eX * (2/3) * mySize_x + eY * mySize_y, textColor, alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos, text, eX * (2/3) * mySize.x + eY * mySize.y, textColor, alpha, DRAWFLAG_NORMAL);
 
-       drawpic_aspect_skin(iconPos, GetAmmoPicture(ammoType), '1 1 0' * mySize_y, iconColor, alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(iconPos, GetAmmoPicture(ammoType), '1 1 0' * mySize.y, iconColor, alpha, DRAWFLAG_NORMAL);
 }
 
 float nade_prevstatus;
@@ -1006,29 +1007,29 @@ void HUD_Ammo(void)
        else
                nade_prevstatus = nade_prevframe = nade_statuschange_time = 0;
 
-       rows = mySize_y/mySize_x;
+       rows = mySize.y/mySize.x;
        rows = bound(1, floor((sqrt(4 * (3/1) * rows * (total_ammo_count) + rows * rows) + rows + 0.5) / 2), (total_ammo_count));
        //                               ^^^ ammo item aspect goes here
 
        columns = ceil((total_ammo_count)/rows);
 
-       ammo_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+       ammo_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
        
 
        vector offset = '0 0 0'; // fteqcc sucks
        float newSize;
-       if(ammo_size_x/ammo_size_y > 3)
+       if(ammo_size.x/ammo_size.y > 3)
        {
-               newSize = 3 * ammo_size_y;
-               offset_x = ammo_size_x - newSize;
-               pos_x += offset_x/2;
+               newSize = 3 * ammo_size.y;
+               offset_x = ammo_size.x - newSize;
+               pos.x += offset.x/2;
                ammo_size_x = newSize;
        }
        else
        {
-               newSize = 1/3 * ammo_size_x;
-               offset_y = ammo_size_y - newSize;
-               pos_y += offset_y/2;
+               newSize = 1/3 * ammo_size.x;
+               offset_y = ammo_size.y - newSize;
+               pos.y += offset.y/2;
                ammo_size_y = newSize;
        }
 
@@ -1067,7 +1068,7 @@ void HUD_Ammo(void)
                {
                        ammotype = GetAmmoFieldFromNum(i);
                        DrawAmmoItem(
-                               pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y),
+                               pos + eX * column * (ammo_size.x + offset.x) + eY * row * (ammo_size.y + offset.y),
                                ammo_size,
                                ammotype,
                                ((get_weaponinfo(switchweapon)).ammo_field == ammotype),
@@ -1089,7 +1090,7 @@ void HUD_Ammo(void)
 
                float f = bound(0, nade_statuschange_elapsedtime*2, 1);
 
-               DrawAmmoNades(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, nade_prevstatus < nade_cnt && nade_cnt != 0 && f < 1, f);
+               DrawAmmoNades(pos + eX * column * (ammo_size.x + offset.x) + eY * row * (ammo_size.y + offset.y), ammo_size, nade_prevstatus < nade_cnt && nade_cnt != 0 && f < 1, f);
        }
 
        draw_endBoldFont();
@@ -1102,76 +1103,76 @@ void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, fl
 
        if (vertical)
        {
-               if(mySize_y/mySize_x > 2)
+               if(mySize.y/mySize.x > 2)
                {
-                       newSize_y = 2 * mySize_x;
-                       newSize_x = mySize_x;
+                       newSize_y = 2 * mySize.x;
+                       newSize_x = mySize.x;
 
-                       newPos_y = myPos_y + (mySize_y - newSize_y) / 2;
-                       newPos_x = myPos_x;
+                       newPos_y = myPos.y + (mySize.y - newSize.y) / 2;
+                       newPos_x = myPos.x;
                }
                else
                {
-                       newSize_x = 1/2 * mySize_y;
-                       newSize_y = mySize_y;
+                       newSize_x = 1/2 * mySize.y;
+                       newSize_y = mySize.y;
 
-                       newPos_x = myPos_x + (mySize_x - newSize_x) / 2;
-                       newPos_y = myPos_y;
+                       newPos_x = myPos.x + (mySize.x - newSize.x) / 2;
+                       newPos_y = myPos.y;
                }
 
                if(icon_right_align)
                {
                        numpos = newPos;
-                       picpos = newPos + eY * newSize_x;
+                       picpos = newPos + eY * newSize.x;
                }
                else
                {
                        picpos = newPos;
-                       numpos = newPos + eY * newSize_x;
+                       numpos = newPos + eY * newSize.x;
                }
 
-               newSize_y /= 2;
+               newSize.y /= 2;
                drawpic_aspect_skin(picpos, icon, newSize, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
                // make number smaller than icon, it looks better
                // reduce only y to draw numbers with different number of digits with the same y size
-               numpos_y += newSize_y * ((1 - 0.7) / 2);
-               newSize_y *= 0.7;
+               numpos.y += newSize.y * ((1 - 0.7) / 2);
+               newSize.y *= 0.7;
                drawstring_aspect(numpos, ftos(x), newSize, color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL);
                return;
        }
 
-       if(mySize_x/mySize_y > 3)
+       if(mySize.x/mySize.y > 3)
        {
-               newSize_x = 3 * mySize_y;
-               newSize_y = mySize_y;
+               newSize_x = 3 * mySize.y;
+               newSize_y = mySize.y;
 
-               newPos_x = myPos_x + (mySize_x - newSize_x) / 2;
-               newPos_y = myPos_y;
+               newPos_x = myPos.x + (mySize.x - newSize.x) / 2;
+               newPos_y = myPos.y;
        }
        else
        {
-               newSize_y = 1/3 * mySize_x;
-               newSize_x = mySize_x;
+               newSize_y = 1/3 * mySize.x;
+               newSize_x = mySize.x;
 
-               newPos_y = myPos_y + (mySize_y - newSize_y) / 2;
-               newPos_x = myPos_x;
+               newPos_y = myPos.y + (mySize.y - newSize.y) / 2;
+               newPos_x = myPos.x;
        }
 
        if(icon_right_align) // right align
        {
                numpos = newPos;
-               picpos = newPos + eX * 2 * newSize_y;
+               picpos = newPos + eX * 2 * newSize.y;
        }
        else // left align
        {
-               numpos = newPos + eX * newSize_y;
+               numpos = newPos + eX * newSize.y;
                picpos = newPos;
        }
 
        // NOTE: newSize_x is always equal to 3 * mySize_y so we can use
        // '2 1 0' * newSize_y instead of eX * (2/3) * newSize_x + eY * newSize_y
-       drawstring_aspect_expanding(numpos, ftos(x), '2 1 0' * newSize_y, color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, fadelerp);
-       drawpic_aspect_skin_expanding(picpos, icon, '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, fadelerp);
+       drawstring_aspect_expanding(numpos, ftos(x), '2 1 0' * newSize.y, color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, fadelerp);
+       drawpic_aspect_skin_expanding(picpos, icon, '1 1 0' * newSize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, fadelerp);
 }
 
 void DrawNumIcon(vector myPos, vector mySize, float x, string icon, float vertical, float icon_right_align, vector color, float theAlpha)
@@ -1224,7 +1225,7 @@ void HUD_Powerups(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float panel_ar = mySize_x/mySize_y;
+       float panel_ar = mySize.x/mySize.y;
        float is_vertical = (panel_ar < 1);
        vector shield_offset = '0 0 0', strength_offset = '0 0 0', superweapons_offset = '0 0 0';
 
@@ -1253,40 +1254,40 @@ void HUD_Powerups(void)
        {
                if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
                {
-                       mySize_x *= (1.0 / 3.0);
-                       superweapons_offset_x = mySize_x;
+                       mySize.x *= (1.0 / 3.0);
+                       superweapons_offset_x = mySize.x;
                        if (autocvar_hud_panel_powerups_flip)
-                               shield_offset_x = 2*mySize_x;
+                               shield_offset_x = 2*mySize.x;
                        else
-                               strength_offset_x = 2*mySize_x;
+                               strength_offset_x = 2*mySize.x;
                }
                else
                {
-                       mySize_y *= (1.0 / 3.0);
-                       superweapons_offset_y = mySize_y;
+                       mySize.y *= (1.0 / 3.0);
+                       superweapons_offset_y = mySize.y;
                        if (autocvar_hud_panel_powerups_flip)
-                               shield_offset_y = 2*mySize_y;
+                               shield_offset_y = 2*mySize.y;
                        else
-                               strength_offset_y = 2*mySize_y;
+                               strength_offset_y = 2*mySize.y;
                }
        }
        else
        {
                if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
                {
-                       mySize_x *= 0.5;
+                       mySize.x *= 0.5;
                        if (autocvar_hud_panel_powerups_flip)
-                               shield_offset_x = mySize_x;
+                               shield_offset_x = mySize.x;
                        else
-                               strength_offset_x = mySize_x;
+                               strength_offset_x = mySize.x;
                }
                else
                {
-                       mySize_y *= 0.5;
+                       mySize.y *= 0.5;
                        if (autocvar_hud_panel_powerups_flip)
-                               shield_offset_y = mySize_y;
+                               shield_offset_y = mySize.y;
                        else
-                               strength_offset_y = mySize_y;
+                               strength_offset_y = mySize.y;
                }
        }
 
@@ -1463,18 +1464,18 @@ void HUD_HealthArmor(void)
                v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON);
 
                float x;
-               x = floor(v_x + 1);
+               x = floor(v.x + 1);
 
         float maxtotal = maxhealth + maxarmor;
                string biggercount;
-               if(v_z) // NOT fully armored
+               if(v.z) // NOT fully armored
                {
                        biggercount = "health";
                        if(autocvar_hud_panel_healtharmor_progressbar)
                                HUD_Panel_DrawProgressBar(pos, mySize, autocvar_hud_panel_healtharmor_progressbar_health, x/maxtotal, 0, (baralign == 1 || baralign == 2), autocvar_hud_progressbar_health_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        if(armor)
             if(autocvar_hud_panel_healtharmor_text)
-                               drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "armor", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha * armor / health, DRAWFLAG_NORMAL);
+                               drawpic_aspect_skin(pos + eX * mySize.x - eX * 0.5 * mySize.y, "armor", '0.5 0.5 0' * mySize.y, '1 1 1', panel_fg_alpha * armor / health, DRAWFLAG_NORMAL);
                }
                else
                {
@@ -1483,34 +1484,34 @@ void HUD_HealthArmor(void)
                                HUD_Panel_DrawProgressBar(pos, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, x/maxtotal, 0, (baralign == 1 || baralign == 2), autocvar_hud_progressbar_armor_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        if(health)
             if(autocvar_hud_panel_healtharmor_text)
-                               drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawpic_aspect_skin(pos + eX * mySize.x - eX * 0.5 * mySize.y, "health", '0.5 0.5 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
         if(autocvar_hud_panel_healtharmor_text)
                        DrawNumIcon(pos, mySize, x, biggercount, 0, iconalign, HUD_Get_Num_Color(x, maxtotal), 1);
 
                if(fuel)
-                       HUD_Panel_DrawProgressBar(pos, eX * mySize_x + eY * 0.2 * mySize_y, "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+                       HUD_Panel_DrawProgressBar(pos, eX * mySize.x + eY * 0.2 * mySize.y, "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
        }
        else
        {
-               float panel_ar = mySize_x/mySize_y;
+               float panel_ar = mySize.x/mySize.y;
                float is_vertical = (panel_ar < 1);
                vector health_offset = '0 0 0', armor_offset = '0 0 0';
                if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
                {
-                       mySize_x *= 0.5;
+                       mySize.x *= 0.5;
                        if (autocvar_hud_panel_healtharmor_flip)
-                               health_offset_x = mySize_x;
+                               health_offset_x = mySize.x;
                        else
-                               armor_offset_x = mySize_x;
+                               armor_offset_x = mySize.x;
                }
                else
                {
-                       mySize_y *= 0.5;
+                       mySize.y *= 0.5;
                        if (autocvar_hud_panel_healtharmor_flip)
-                               health_offset_y = mySize_y;
+                               health_offset_y = mySize.y;
                        else
-                               armor_offset_y = mySize_y;
+                               armor_offset_y = mySize.y;
                }
 
                float health_baralign, armor_baralign, fuel_baralign;
@@ -1636,13 +1637,13 @@ void HUD_HealthArmor(void)
                if(fuel)
                {
                        if (is_vertical)
-                               mySize_x *= 0.2 / 2; //if vertical always halve x to not cover too much numbers with 3 digits
+                               mySize.x *= 0.2 / 2; //if vertical always halve x to not cover too much numbers with 3 digits
                        else
-                               mySize_y *= 0.2;
+                               mySize.y *= 0.2;
                        if (panel_ar >= 4)
-                               mySize_x *= 2; //restore full panel size
+                               mySize.x *= 2; //restore full panel size
                        else if (panel_ar < 1/4)
-                               mySize_y *= 2; //restore full panel size
+                               mySize.y *= 2; //restore full panel size
                        HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                }
        }
@@ -1718,18 +1719,18 @@ void HUD_Notify(void)
        float fade_time = max(0, autocvar_hud_panel_notify_fadetime);
        float icon_aspect = max(1, autocvar_hud_panel_notify_icon_aspect);
 
-       float entry_count = bound(1, floor(NOTIFY_MAX_ENTRIES * size_y / size_x), NOTIFY_MAX_ENTRIES);
-       float entry_height = size_y / entry_count;
+       float entry_count = bound(1, floor(NOTIFY_MAX_ENTRIES * size.y / size.x), NOTIFY_MAX_ENTRIES);
+       float entry_height = size.y / entry_count;
 
-       float panel_width_half = size_x * 0.5;
+       float panel_width_half = size.x * 0.5;
        float icon_width_half = entry_height * icon_aspect / 2;
-       float name_maxwidth = panel_width_half - icon_width_half - size_x * NOTIFY_ICON_MARGIN;
+       float name_maxwidth = panel_width_half - icon_width_half - size.x * NOTIFY_ICON_MARGIN;
 
        vector font_size = '0.5 0.5 0' * entry_height * autocvar_hud_panel_notify_fontsize;
        vector icon_size = (eX * icon_aspect + eY) * entry_height;
        vector icon_left = eX * (panel_width_half - icon_width_half);
        vector attacker_right = eX * name_maxwidth;
-       vector victim_left = eX * (size_x - name_maxwidth);
+       vector victim_left = eX * (size.x - name_maxwidth);
 
        vector attacker_pos, victim_pos, icon_pos;
        string attacker, victim, icon;
@@ -1782,7 +1783,7 @@ void HUD_Notify(void)
 
                if (icon != "" && victim != "")
                {
-                       vector name_top = eY * (i * entry_height + 0.5 * (entry_height - font_size_y));
+                       vector name_top = eY * (i * entry_height + 0.5 * (entry_height - font_size.y));
 
                        icon_pos = pos + icon_left + eY * i * entry_height;
                        drawpic_aspect_skin(icon_pos, icon, icon_size, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
@@ -1901,10 +1902,10 @@ void HUD_Radar(void)
        if (hud_panel_radar_maximized && !autocvar__hud_configure)
        {
                panel_size = autocvar_hud_panel_radar_maximized_size;
-               panel_size_x = bound(0.2, panel_size_x, 1) * vid_conwidth;
-               panel_size_y = bound(0.2, panel_size_y, 1) * vid_conheight;
-               panel_pos_x = (vid_conwidth - panel_size_x) / 2;
-               panel_pos_y = (vid_conheight - panel_size_y) / 2;
+               panel_size_x = bound(0.2, panel_size.x, 1) * vid_conwidth;
+               panel_size_y = bound(0.2, panel_size.y, 1) * vid_conheight;
+               panel_pos_x = (vid_conwidth - panel_size.x) / 2;
+               panel_pos_y = (vid_conheight - panel_size.y) / 2;
 
                string panel_bg;
                panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized
@@ -1936,7 +1937,7 @@ void HUD_Radar(void)
                switch(hud_panel_radar_maximized_rotation)
                {
                        case 0:
-                               teamradar_angle = view_angles_y - 90;
+                               teamradar_angle = view_angles.y - 90;
                                break;
                        default:
                                teamradar_angle = 90 * hud_panel_radar_maximized_rotation;
@@ -1965,7 +1966,7 @@ void HUD_Radar(void)
                switch(hud_panel_radar_rotation)
                {
                        case 0:
-                               teamradar_angle = view_angles_y - 90;
+                               teamradar_angle = view_angles.y - 90;
                                break;
                        default:
                                teamradar_angle = 90 * hud_panel_radar_rotation;
@@ -2012,16 +2013,16 @@ void HUD_Radar(void)
                vector c0, c1, c2, c3, span;
                c0 = rotate(mi_min, teamradar_angle * DEG2RAD);
                c1 = rotate(mi_max, teamradar_angle * DEG2RAD);
-               c2 = rotate('1 0 0' * mi_min_x + '0 1 0' * mi_max_y, teamradar_angle * DEG2RAD);
-               c3 = rotate('1 0 0' * mi_max_x + '0 1 0' * mi_min_y, teamradar_angle * DEG2RAD);
+               c2 = rotate('1 0 0' * mi_min.x + '0 1 0' * mi_max.y, teamradar_angle * DEG2RAD);
+               c3 = rotate('1 0 0' * mi_max.x + '0 1 0' * mi_min.y, teamradar_angle * DEG2RAD);
                span = '0 0 0';
                span_x = max(c0_x, c1_x, c2_x, c3_x) - min(c0_x, c1_x, c2_x, c3_x);
                span_y = max(c0_y, c1_y, c2_y, c3_y) - min(c0_y, c1_y, c2_y, c3_y);
 
                // max-min distance must fit the radar in x=x, y=y
                bigsize = min(
-                       teamradar_size2d_x * scale2d / (1.05 * span_x),
-                       teamradar_size2d_y * scale2d / (1.05 * span_y)
+                       teamradar_size2d.x * scale2d / (1.05 * span.x),
+                       teamradar_size2d.y * scale2d / (1.05 * span.y)
                );
        }
 
@@ -2037,10 +2038,10 @@ void HUD_Radar(void)
                + (1 - f) * view_origin);
 
        drawsetcliparea(
-               pos_x,
-               pos_y,
-               mySize_x,
-               mySize_y
+               pos.x,
+               pos.y,
+               mySize.x,
+               mySize.y
        );
 
        draw_teamradar_background(hud_panel_radar_foreground_alpha);
@@ -2069,15 +2070,15 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
        entity tm = world, pl;
        float SCOREPANEL_MAX_ENTRIES = 6;
        float SCOREPANEL_ASPECTRATIO = 2;
-       float entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize_y/mySize_x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES);
-       vector fontsize = '1 1 0' * (mySize_y/entries);
+       float entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize.y/mySize.x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES);
+       vector fontsize = '1 1 0' * (mySize.y/entries);
 
        vector rgb, score_color;
        rgb = '1 1 1';
        score_color = '1 1 1';
 
-       float name_size = mySize_x*0.75;
-       float spacing_size = mySize_x*0.04;
+       float name_size = mySize.x*0.75;
+       float spacing_size = mySize.x*0.04;
        const float highlight_alpha = 0.2;
        float i = 0, me_printed = 0, first_pl = 0;
        string s;
@@ -2087,15 +2088,15 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                if (team_count)
                {
                        // show team scores in the first line
-                       float score_size = mySize_x / team_count;
+                       float score_size = mySize.x / team_count;
                        players_per_team = max(2, ceil((entries - 1) / team_count));
                        for(i=0; i<team_count; ++i) {
                                if (i == floor((entries - 2) / players_per_team) || (entries == 1 && i == 0))
-                                       HUD_Panel_DrawHighlight(pos + eX * score_size * i, eX * score_size + eY * fontsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos + eX * score_size * i, ftos(175 - 23*i), eX * score_size + eY * fontsize_y, Team_ColorRGB(ColorByTeam(i)) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       HUD_Panel_DrawHighlight(pos + eX * score_size * i, eX * score_size + eY * fontsize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos + eX * score_size * i, ftos(175 - 23*i), eX * score_size + eY * fontsize.y, Team_ColorRGB(ColorByTeam(i)) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        first_pl = 1;
-                       pos_y += fontsize_y;
+                       pos.y += fontsize.y;
                }
                score = 10 + SCOREPANEL_MAX_ENTRIES * 3;
                for (i=first_pl; i<entries; ++i)
@@ -2106,7 +2107,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        if (i == entries-1 && autocvar_hud_panel_score_rankings == 1)
                        {
                                rgb = '1 1 0';
-                               drawfill(pos, eX * mySize_x + eY * fontsize_y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                s = GetPlayerName(player_localnum);
                                score = 7;
                        }
@@ -2121,7 +2122,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        s = textShortenToWidth(s, name_size, fontsize, stringwidth_colors);
                        drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                        drawstring(pos + eX * (name_size + spacing_size), ftos(score), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-                       pos_y += fontsize_y;
+                       pos.y += fontsize.y;
                }
                return;
        }
@@ -2131,17 +2132,17 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
        if (team_count)
        {
                // show team scores in the first line
-               float score_size = mySize_x / team_count;
+               float score_size = mySize.x / team_count;
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
                        if(tm.team == NUM_SPECTATOR)
                                continue;
                        if (tm.team == myteam)
-                               drawfill(pos + eX * score_size * i, eX * score_size + eY * fontsize_y, '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores[ts_primary])), eX * score_size + eY * fontsize_y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawfill(pos + eX * score_size * i, eX * score_size + eY * fontsize.y, '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores[ts_primary])), eX * score_size + eY * fontsize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        ++i;
                }
                first_pl = 1;
-               pos_y += fontsize_y;
+               pos.y += fontsize.y;
                tm = teams.sort_next;
        }
        i = first_pl;
@@ -2171,14 +2172,14 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        if (i == first_pl)
                                rgb = '0 1 0'; //first: green
                        me_printed = 1;
-                       drawfill(pos, eX * mySize_x + eY * fontsize_y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                if (team_count)
                        score_color = Team_ColorRGB(pl.team) * 0.8;
                s = textShortenToWidth(GetPlayerName(pl.sv_entnum), name_size, fontsize, stringwidth_colors);
                drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-               pos_y += fontsize_y;
+               pos.y += fontsize.y;
                ++i;
        }
        while (i<entries && team_count && (tm = tm.sort_next) && (tm.team != NUM_SPECTATOR || (tm = tm.sort_next)));
@@ -2239,12 +2240,12 @@ void HUD_Score(void)
                                distribution_color = '1 0 0';
                                sign = "+";
                        }
-                       drawstring_aspect(pos + eX * 0.75 * mySize_x, strcat(sign, distrtimer), eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * 0.75 * mySize.x, strcat(sign, distrtimer), eX * 0.25 * mySize.x + eY * (1/3) * mySize.y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                // race record display
                if (distribution <= 0)
-                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos, timer, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(pos, timer, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                draw_endBoldFont();
        } else if (!teamplay) { // non-teamgames
                if ((spectatee_status == -1 && !autocvar__hud_configure) || autocvar_hud_panel_score_rankings)
@@ -2284,10 +2285,10 @@ void HUD_Score(void)
                {
                        if (distribution > 0)
                                distribution_str = strcat("+", distribution_str);
-                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
-               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eX * 0.75 * mySize_x, distribution_str, eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize.x + eY * mySize.y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(pos + eX * 0.75 * mySize.x, distribution_str, eX * 0.25 * mySize.x + eY * (1/3) * mySize.y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                draw_endBoldFont();
        } else { // teamgames
                float row, column, rows = 0, columns = 0;
@@ -2300,32 +2301,32 @@ void HUD_Score(void)
                }
                if(spectatee_status == -1)
                {
-                       rows = mySize_y/mySize_x;
+                       rows = mySize.y/mySize.x;
                        rows = bound(1, floor((sqrt(4 * (3/1) * rows * team_count + rows * rows) + rows + 0.5) / 2), team_count);
                        //                               ^^^ ammo item aspect goes here
 
                        columns = ceil(team_count/rows);
 
-                       score_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+                       score_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
 
                        float newSize;
-                       if(score_size_x/score_size_y > 3)
+                       if(score_size.x/score_size.y > 3)
                        {
-                               newSize = 3 * score_size_y;
-                               offset_x = score_size_x - newSize;
-                               pos_x += offset_x/2;
+                               newSize = 3 * score_size.y;
+                               offset_x = score_size.x - newSize;
+                               pos.x += offset.x/2;
                                score_size_x = newSize;
                        }
                        else
                        {
-                               newSize = 1/3 * score_size_x;
-                               offset_y = score_size_y - newSize;
-                               pos_y += offset_y/2;
+                               newSize = 1/3 * score_size.x;
+                               offset_y = score_size.y - newSize;
+                               pos.y += offset.y/2;
                                score_size_y = newSize;
                        }
                }
                else
-                       score_size = eX * mySize_x*(1/4) + eY * mySize_y*(1/3);
+                       score_size = eX * mySize.x*(1/4) + eY * mySize.y*(1/3);
 
                float max_fragcount;
                max_fragcount = -99;
@@ -2343,7 +2344,7 @@ void HUD_Score(void)
 
                        if (spectatee_status == -1)
                        {
-                               score_pos = pos + eX * column * (score_size_x + offset_x) + eY * row * (score_size_y + offset_y);
+                               score_pos = pos + eX * column * (score_size.x + offset.x) + eY * row * (score_size.y + offset.y);
                                if (max_fragcount == score)
                                        HUD_Panel_DrawHighlight(score_pos, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                                drawstring_aspect(score_pos, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2356,12 +2357,12 @@ void HUD_Score(void)
                        }
                        else if(tm.team == myteam) {
                                if (max_fragcount == score)
-                                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize.x + eY * mySize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        } else {
                                if (max_fragcount == score)
-                                       HUD_Panel_DrawHighlight(pos + eX * 0.75 * mySize_x + eY * (1/3) * rows * mySize_y, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos + eX * 0.75 * mySize_x + eY * (1/3) * rows * mySize_y, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       HUD_Panel_DrawHighlight(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                                ++rows;
                        }
                }
@@ -2397,19 +2398,19 @@ void HUD_RaceTimer (void)
 
        // always force 4:1 aspect
        vector newSize = '0 0 0';
-       if(mySize_x/mySize_y > 4)
+       if(mySize.x/mySize.y > 4)
        {
-               newSize_x = 4 * mySize_y;
-               newSize_y = mySize_y;
+               newSize_x = 4 * mySize.y;
+               newSize_y = mySize.y;
 
-               pos_x = pos_x + (mySize_x - newSize_x) / 2;
+               pos_x = pos.x + (mySize.x - newSize.x) / 2;
        }
        else
        {
-               newSize_y = 1/4 * mySize_x;
-               newSize_x = mySize_x;
+               newSize_y = 1/4 * mySize.x;
+               newSize_x = mySize.x;
 
-               pos_y = pos_y + (mySize_y - newSize_y) / 2;
+               pos_y = pos.y + (mySize.y - newSize.y) / 2;
        }
        mySize = newSize;
 
@@ -2419,11 +2420,11 @@ void HUD_RaceTimer (void)
        if(autocvar__hud_configure)
        {
                s = "0:13:37";
-               drawstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, FALSE, '0.60 0.60 0' * mySize_y), s, '0.60 0.60 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, FALSE, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                s = _("^1Intermediate 1 (+15.42)");
-               drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.20 * mySize_y) + eY * 0.60 * mySize_y, s, '1 1 0' * 0.20 * mySize_y, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
                s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint");
-               drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.20 * mySize_y) + eY * 0.80 * mySize_y, s, '1 1 0' * 0.20 * mySize_y, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.20 * mySize.y) + eY * 0.80 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        else if(race_checkpointtime)
        {
@@ -2456,7 +2457,7 @@ void HUD_RaceTimer (void)
 
                if(s != "" && a > 0)
                {
-                       drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize_y) + eY * 0.6 * mySize_y, s, '1 1 0' * 0.2 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                if(race_penaltytime)
@@ -2465,14 +2466,14 @@ void HUD_RaceTimer (void)
                        if(a > 0)
                        {
                                s = sprintf(_("^1PENALTY: %.1f (%s)"), race_penaltytime * 0.1, race_penaltyreason);
-                               drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize_y) + eY * 0.8 * mySize_y, s, '1 1 0' * 0.2 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.8 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                        }
                }
 
                if(forcetime != "")
                {
                        a = bound(0, (time - race_checkpointtime) / 0.5, 1);
-                       drawstring_expanding(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(forcetime, FALSE, '1 1 0' * 0.6 * mySize_y), forcetime, '1 1 0' * 0.6 * mySize_y, '1 1 1', panel_fg_alpha, 0, a);
+                       drawstring_expanding(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(forcetime, FALSE, '1 1 0' * 0.6 * mySize.y), forcetime, '1 1 0' * 0.6 * mySize.y, '1 1 1', panel_fg_alpha, 0, a);
                }
                else
                        a = 1;
@@ -2480,7 +2481,7 @@ void HUD_RaceTimer (void)
                if(race_laptime && race_checkpoint != 255)
                {
                        s = TIME_ENCODED_TOSTRING(TIME_ENCODE(time + TIME_DECODE(race_penaltyaccumulator) - race_laptime));
-                       drawstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, FALSE, '0.6 0.6 0' * mySize_y), s, '0.6 0.6 0' * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, FALSE, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
        }
        else
@@ -2489,13 +2490,13 @@ void HUD_RaceTimer (void)
                {
                        a = bound(0, 2 - (time - race_mycheckpointtime), 1);
                        s = MakeRaceString(race_mycheckpoint, TIME_DECODE(race_mycheckpointdelta), -(race_mycheckpointenemy == ""), race_mycheckpointlapsdelta, race_mycheckpointenemy);
-                       drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize_y) + eY * 0.6 * mySize_y, s, '1 1 0' * 0.2 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
                if(race_othercheckpointtime && race_othercheckpointenemy != "")
                {
                        a = bound(0, 2 - (time - race_othercheckpointtime), 1);
                        s = MakeRaceString(race_othercheckpoint, -TIME_DECODE(race_othercheckpointdelta), -(race_othercheckpointenemy == ""), race_othercheckpointlapsdelta, race_othercheckpointenemy);
-                       drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize_y) + eY * 0.6 * mySize_y, s, '1 1 0' * 0.2 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                if(race_penaltytime && !race_penaltyaccumulator)
@@ -2508,7 +2509,7 @@ void HUD_RaceTimer (void)
                                        s = sprintf(_("^1PENALTY: %.1f (%s)"), (t - time) * 0.1, race_penaltyreason);
                                else
                                        s = sprintf(_("^2PENALTY: %.1f (%s)"), 0, race_penaltyreason);
-                               drawcolorcodedstring(pos + eX * 0.5 * mySize_x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize_y) + eY * 0.6 * mySize_y, s, '1 1 0' * 0.2 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                        }
                }
        }
@@ -2605,61 +2606,61 @@ void HUD_Vote(void)
 
        // always force 3:1 aspect
        vector newSize = '0 0 0';
-       if(mySize_x/mySize_y > 3)
+       if(mySize.x/mySize.y > 3)
        {
-               newSize_x = 3 * mySize_y;
-               newSize_y = mySize_y;
+               newSize_x = 3 * mySize.y;
+               newSize_y = mySize.y;
 
-               pos_x = pos_x + (mySize_x - newSize_x) / 2;
+               pos_x = pos.x + (mySize.x - newSize.x) / 2;
        }
        else
        {
-               newSize_y = 1/3 * mySize_x;
-               newSize_x = mySize_x;
+               newSize_y = 1/3 * mySize.x;
+               newSize_x = mySize.x;
 
-               pos_y = pos_y + (mySize_y - newSize_y) / 2;
+               pos_y = pos.y + (mySize.y - newSize.y) / 2;
        }
        mySize = newSize;
 
        s = _("A vote has been called for:");
        if(uid2name_dialog)
                s = _("Allow servers to store and display your name?");
-       drawstring_aspect(pos, s, eX * mySize_x + eY * (2/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL);
-       s = textShortenToWidth(vote_called_vote, mySize_x, '1 1 0' * mySize_y * (1/8), stringwidth_colors);
+       drawstring_aspect(pos, s, eX * mySize.x + eY * (2/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
+       s = textShortenToWidth(vote_called_vote, mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors);
        if(autocvar__hud_configure)
                s = _("^1Configure the HUD");
-       drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize_y, s, eX * mySize_x + eY * (1.75/8) * mySize_y, a, DRAWFLAG_NORMAL);
+       drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, a, DRAWFLAG_NORMAL);
 
        // print the yes/no counts
     s = sprintf(_("Yes (%s): %d"), getcommandkey("vyes", "vyes"), vote_yescount);
-       drawstring_aspect(pos + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '0 1 0', a, DRAWFLAG_NORMAL);
+       drawstring_aspect(pos + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, '0 1 0', a, DRAWFLAG_NORMAL);
     s = sprintf(_("No (%s): %d"), getcommandkey("vno", "vno"), vote_nocount);
-       drawstring_aspect(pos + eX * 0.5 * mySize_x + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '1 0 0', a, DRAWFLAG_NORMAL);
+       drawstring_aspect(pos + eX * 0.5 * mySize.x + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, '1 0 0', a, DRAWFLAG_NORMAL);
 
        // draw the progress bar backgrounds
-       drawpic_skin(pos + eY * (5/8) * mySize_y, "voteprogress_back", eX * mySize_x + eY * (3/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL);
+       drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_back", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
 
        // draw the highlights
        if(vote_highlighted == 1) {
-               drawsetcliparea(pos_x, pos_y, mySize_x * 0.5, mySize_y);
-               drawpic_skin(pos + eY * (5/8) * mySize_y, "voteprogress_voted", eX * mySize_x + eY * (3/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL);
+               drawsetcliparea(pos.x, pos.y, mySize.x * 0.5, mySize.y);
+               drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_voted", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
        }
        else if(vote_highlighted == -1) {
-               drawsetcliparea(pos_x + 0.5 * mySize_x, pos_y, mySize_x * 0.5, mySize_y);
-               drawpic_skin(pos + eY * (5/8) * mySize_y, "voteprogress_voted", eX * mySize_x + eY * (3/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL);
+               drawsetcliparea(pos.x + 0.5 * mySize.x, pos.y, mySize.x * 0.5, mySize.y);
+               drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_voted", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
        }
 
        // draw the progress bars
        if(vote_yescount && vote_needed)
        {
-               drawsetcliparea(pos_x, pos_y, mySize_x * 0.5 * (vote_yescount/vote_needed), mySize_y);
-               drawpic_skin(pos + eY * (5/8) * mySize_y, "voteprogress_prog", eX * mySize_x + eY * (3/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL);
+               drawsetcliparea(pos.x, pos.y, mySize.x * 0.5 * (vote_yescount/vote_needed), mySize.y);
+               drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_prog", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
        }
 
        if(vote_nocount && vote_needed)
        {
-               drawsetcliparea(pos_x + mySize_x - mySize_x * 0.5 * (vote_nocount/vote_needed), pos_y, mySize_x * 0.5, mySize_y);
-               drawpic_skin(pos + eY * (5/8) * mySize_y, "voteprogress_prog", eX * mySize_x + eY * (3/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL);
+               drawsetcliparea(pos.x + mySize.x - mySize.x * 0.5 * (vote_nocount/vote_needed), pos.y, mySize.x * 0.5, mySize.y);
+               drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_prog", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);
        }
 
        drawresetcliparea();
@@ -2700,23 +2701,23 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, flo
                        break;
        }
 
-       if(mySize_x/mySize_y > aspect_ratio)
+       if(mySize.x/mySize.y > aspect_ratio)
        {
-               i = aspect_ratio * mySize_y;
-               myPos_x = myPos_x + (mySize_x - i) / 2;
+               i = aspect_ratio * mySize.y;
+               myPos_x = myPos.x + (mySize.x - i) / 2;
                mySize_x = i;
        }
        else
        {
-               i = 1/aspect_ratio * mySize_x;
-               myPos_y = myPos_y + (mySize_y - i) / 2;
+               i = 1/aspect_ratio * mySize.x;
+               myPos_y = myPos.y + (mySize.y - i) / 2;
                mySize_y = i;
        }
 
        if(layout)
        {
-               drawpic_aspect_skin(myPos, pic, eX * 0.7 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(myPos + eX * 0.7 * mySize_x, ftos(stat), eX * 0.3 * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(myPos, pic, eX * 0.7 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(myPos + eX * 0.7 * mySize.x, ftos(stat), eX * 0.3 * mySize.x + eY * mySize.y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        else
                drawstring_aspect(myPos, ftos(stat), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2733,7 +2734,7 @@ void HUD_Mod_CA(vector myPos, vector mySize)
        else //if(gametype == MAPINFO_TYPE_FREEZETAG)
                layout = autocvar_hud_panel_modicons_freezetag_layout;
        float rows, columns, aspect_ratio;
-       rows = mySize_y/mySize_x;
+       rows = mySize.y/mySize.x;
        aspect_ratio = (layout) ? 2 : 1;
        rows = bound(1, floor((sqrt((4 * aspect_ratio * team_count + rows) * rows) + rows + 0.5) / 2), team_count);
        columns = ceil(team_count/rows);
@@ -2741,10 +2742,10 @@ void HUD_Mod_CA(vector myPos, vector mySize)
        int i;
        float row = 0, column = 0;
        vector pos, itemSize;
-       itemSize = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+       itemSize = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
        for(i=0; i<team_count; ++i)
        {
-               pos = myPos + eX * column * itemSize_x + eY * row * itemSize_y;
+               pos = myPos + eX * column * itemSize.x + eY * row * itemSize.y;
 
                DrawCAItem(pos, itemSize, aspect_ratio, layout, i);
 
@@ -2875,24 +2876,24 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                        break;
        }
 
-       if(mySize_x > mySize_y) {
+       if(mySize.x > mySize.y) {
                if (myteam == NUM_TEAM_1) { // always draw own flag on left
                        redflag_pos = pos;
-                       blueflag_pos = pos + eX * 0.5 * mySize_x;
+                       blueflag_pos = pos + eX * 0.5 * mySize.x;
                } else {
                        blueflag_pos = pos;
-                       redflag_pos = pos + eX * 0.5 * mySize_x;
+                       redflag_pos = pos + eX * 0.5 * mySize.x;
                }
-               flag_size = eX * 0.5 * mySize_x + eY * mySize_y;
+               flag_size = eX * 0.5 * mySize.x + eY * mySize.y;
        } else {
                if (myteam == NUM_TEAM_1) { // always draw own flag on left
                        redflag_pos = pos;
-                       blueflag_pos = pos + eY * 0.5 * mySize_y;
+                       blueflag_pos = pos + eY * 0.5 * mySize.y;
                } else {
                        blueflag_pos = pos;
-                       redflag_pos = pos + eY * 0.5 * mySize_y;
+                       redflag_pos = pos + eY * 0.5 * mySize.y;
                }
-               flag_size = eY * 0.5 * mySize_y + eX * mySize_x;
+               flag_size = eY * 0.5 * mySize.y + eX * mySize.x;
        }
 
        f = bound(0, redflag_statuschange_elapsedtime*2, 1);
@@ -2951,30 +2952,30 @@ void HUD_Mod_KH(vector pos, vector mySize)
 
        vector slot_size;
 
-       if(all_keys == 4 && mySize_x * 0.5 < mySize_y && mySize_y * 0.5 < mySize_x)
+       if(all_keys == 4 && mySize.x * 0.5 < mySize.y && mySize.y * 0.5 < mySize.x)
        {
                // Quadratic arrangement
-               slot_size = eX * mySize_x * 0.5 + eY * mySize_y * 0.5;
+               slot_size = eX * mySize.x * 0.5 + eY * mySize.y * 0.5;
                KH_SLOTS[0] = pos;
-               KH_SLOTS[1] = pos + eX * slot_size_x;
-               KH_SLOTS[2] = pos + eY * slot_size_y;
-               KH_SLOTS[3] = pos + eX * slot_size_x + eY * slot_size_y;
+               KH_SLOTS[1] = pos + eX * slot_size.x;
+               KH_SLOTS[2] = pos + eY * slot_size.y;
+               KH_SLOTS[3] = pos + eX * slot_size.x + eY * slot_size.y;
        }
        else
        {
-               if(mySize_x > mySize_y)
+               if(mySize.x > mySize.y)
                {
                        // Horizontal arrangement
-                       slot_size = eX * mySize_x / all_keys + eY * mySize_y;
+                       slot_size = eX * mySize.x / all_keys + eY * mySize.y;
                        for(i = 0; i < all_keys; ++i)
-                               KH_SLOTS[i] = pos + eX * slot_size_x * i;
+                               KH_SLOTS[i] = pos + eX * slot_size.x * i;
                }
                else
                {
                        // Vertical arrangement
-                       slot_size = eX * mySize_x + eY * mySize_y / all_keys;
+                       slot_size = eX * mySize.x + eY * mySize.y / all_keys;
                        for(i = 0; i < all_keys; ++i)
-                               KH_SLOTS[i] = pos + eY * slot_size_y * i;
+                               KH_SLOTS[i] = pos + eY * slot_size.y * i;
                }
        }
 
@@ -3064,12 +3065,12 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
 
        vector kaball_pos, kaball_size;
 
-       if(mySize_x > mySize_y) {
-               kaball_pos = pos + eX * 0.25 * mySize_x;
-               kaball_size = eX * 0.5 * mySize_x + eY * mySize_y;
+       if(mySize.x > mySize.y) {
+               kaball_pos = pos + eX * 0.25 * mySize.x;
+               kaball_size = eX * 0.5 * mySize.x + eY * mySize.y;
        } else {
-               kaball_pos = pos + eY * 0.25 * mySize_y;
-               kaball_size = eY * 0.5 * mySize_y + eX * mySize_x;
+               kaball_pos = pos + eY * 0.25 * mySize.y;
+               kaball_size = eY * 0.5 * mySize.y + eX * mySize.x;
        }
 
        float kaball_statuschange_elapsedtime = time - kaball_statuschange_time;
@@ -3079,7 +3080,7 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
                drawpic_aspect_skin_expanding(kaball_pos, "keepawayball_carrying", kaball_size, '1 1 1', panel_fg_alpha * kaball_alpha, DRAWFLAG_NORMAL, f);
 
        if(kaball)
-               drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
 }
 
 
@@ -3105,11 +3106,11 @@ void HUD_Mod_NexBall(vector pos, vector mySize)
                if (p > 1)
                        p = 2 - p;
 
-               HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", p, (mySize_x <= mySize_y), 0, autocvar_hud_progressbar_nexball_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+               HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", p, (mySize.x <= mySize.y), 0, autocvar_hud_progressbar_nexball_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
        }
 
        if (stat_items & IT_KEY1)
-               drawpic_aspect_skin(pos, "nexball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos, "nexball_carrying", eX * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
 // Race/CTS HUD mod icons
@@ -3158,16 +3159,16 @@ void HUD_Mod_Race(vector pos, vector mySize)
 
        vector textPos, medalPos;
        float squareSize;
-       if(mySize_x > mySize_y) {
+       if(mySize.x > mySize.y) {
                // text on left side
-               squareSize = min(mySize_y, mySize_x/2);
-               textPos = pos + eX * 0.5 * max(0, mySize_x/2 - squareSize) + eY * 0.5 * (mySize_y - squareSize);
-               medalPos = pos + eX * 0.5 * max(0, mySize_x/2 - squareSize) + eX * 0.5 * mySize_x + eY * 0.5 * (mySize_y - squareSize);
+               squareSize = min(mySize.y, mySize.x/2);
+               textPos = pos + eX * 0.5 * max(0, mySize.x/2 - squareSize) + eY * 0.5 * (mySize.y - squareSize);
+               medalPos = pos + eX * 0.5 * max(0, mySize.x/2 - squareSize) + eX * 0.5 * mySize.x + eY * 0.5 * (mySize.y - squareSize);
        } else {
                // text on top
-               squareSize = min(mySize_x, mySize_y/2);
-               textPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eX * 0.5 * (mySize_x - squareSize);
-               medalPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eY * 0.5 * mySize_y + eX * 0.5 * (mySize_x - squareSize);
+               squareSize = min(mySize.x, mySize.y/2);
+               textPos = pos + eY * 0.5 * max(0, mySize.y/2 - squareSize) + eX * 0.5 * (mySize.x - squareSize);
+               medalPos = pos + eY * 0.5 * max(0, mySize.y/2 - squareSize) + eY * 0.5 * mySize.y + eX * 0.5 * (mySize.x - squareSize);
        }
 
        f = time - crecordtime_change_time;
@@ -3290,16 +3291,16 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, fl
        }
        float pps_ratio = stat / getstatf(STAT_DOM_TOTAL_PPS);
 
-       if(mySize_x/mySize_y > aspect_ratio)
+       if(mySize.x/mySize.y > aspect_ratio)
        {
-               i = aspect_ratio * mySize_y;
-               myPos_x = myPos_x + (mySize_x - i) / 2;
+               i = aspect_ratio * mySize.y;
+               myPos_x = myPos.x + (mySize.x - i) / 2;
                mySize_x = i;
        }
        else
        {
-               i = 1/aspect_ratio * mySize_x;
-               myPos_y = myPos_y + (mySize_y - i) / 2;
+               i = 1/aspect_ratio * mySize.x;
+               myPos_y = myPos.y + (mySize.y - i) / 2;
                mySize_y = i;
        }
 
@@ -3308,17 +3309,17 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, fl
                //draw the text
                color *= 0.5 + pps_ratio * (1 - 0.5); // half saturated color at min, full saturated at max
                if (layout == 2) // average pps
-                       drawstring_aspect(myPos + eX * mySize_y, ftos_decimals(stat, 2), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(myPos + eX * mySize.y, ftos_decimals(stat, 2), eX * (2/3) * mySize.x + eY * mySize.y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
                else // percentage of average pps
-                       drawstring_aspect(myPos + eX * mySize_y, strcat( ftos(floor(pps_ratio*100 + 0.5)), "%" ), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(myPos + eX * mySize.y, strcat( ftos(floor(pps_ratio*100 + 0.5)), "%" ), eX * (2/3) * mySize.x + eY * mySize.y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
 
        //draw the icon
-       drawpic_aspect_skin(myPos, pic, '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(myPos, pic, '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        if (stat > 0)
        {
-               drawsetcliparea(myPos_x, myPos_y + mySize_y * (1 - pps_ratio), mySize_y, mySize_y * pps_ratio);
-               drawpic_aspect_skin(myPos, strcat(pic, "-highlighted"), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawsetcliparea(myPos.x, myPos.y + mySize.y * (1 - pps_ratio), mySize.y, mySize.y * pps_ratio);
+               drawpic_aspect_skin(myPos, strcat(pic, "-highlighted"), '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                drawresetcliparea();
        }
 }
@@ -3329,7 +3330,7 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
 
        int layout = autocvar_hud_panel_modicons_dom_layout;
        float rows, columns, aspect_ratio;
-       rows = mySize_y/mySize_x;
+       rows = mySize.y/mySize.x;
        aspect_ratio = (layout) ? 3 : 1;
        rows = bound(1, floor((sqrt((4 * aspect_ratio * team_count + rows) * rows) + rows + 0.5) / 2), team_count);
        columns = ceil(team_count/rows);
@@ -3337,10 +3338,10 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
        int i;
        float row = 0, column = 0;
        vector pos, itemSize;
-       itemSize = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+       itemSize = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
        for(i=0; i<team_count; ++i)
        {
-               pos = myPos + eX * column * itemSize_x + eY * row * itemSize_y;
+               pos = myPos + eX * column * itemSize.x + eY * row * itemSize.y;
 
                DrawDomItem(pos, itemSize, aspect_ratio, layout, i);
 
@@ -3439,42 +3440,42 @@ void HUD_PressedKeys(void)
        if(aspect)
        {
                vector newSize = '0 0 0';
-               if(mySize_x/mySize_y > aspect)
+               if(mySize.x/mySize.y > aspect)
                {
-                       newSize_x = aspect * mySize_y;
-                       newSize_y = mySize_y;
+                       newSize_x = aspect * mySize.y;
+                       newSize_y = mySize.y;
 
-                       pos_x = pos_x + (mySize_x - newSize_x) / 2;
+                       pos_x = pos.x + (mySize.x - newSize.x) / 2;
                }
                else
                {
-                       newSize_y = 1/aspect * mySize_x;
-                       newSize_x = mySize_x;
+                       newSize_y = 1/aspect * mySize.x;
+                       newSize_x = mySize.x;
 
-                       pos_y = pos_y + (mySize_y - newSize_y) / 2;
+                       pos_y = pos.y + (mySize.y - newSize.y) / 2;
                }
                mySize = newSize;
        }
 
        vector keysize;
-       keysize = eX * mySize_x * (1/3.0) + eY * mySize_y * (1/(3.0 - !autocvar_hud_panel_pressedkeys_attack));
+       keysize = eX * mySize.x * (1/3.0) + eY * mySize.y * (1/(3.0 - !autocvar_hud_panel_pressedkeys_attack));
        float pressedkeys;
        pressedkeys = getstatf(STAT_PRESSED_KEYS);
 
        if(autocvar_hud_panel_pressedkeys_attack)
        {
-               drawpic_aspect_skin(pos + eX * keysize_x * 0.5, ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawpic_aspect_skin(pos + eX * keysize_x * 1.5, ((pressedkeys & KEY_ATCK2) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               pos_y += keysize_y;
+               drawpic_aspect_skin(pos + eX * keysize.x * 0.5, ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos + eX * keysize.x * 1.5, ((pressedkeys & KEY_ATCK2) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               pos.y += keysize.y;
        }
 
        drawpic_aspect_skin(pos, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize_x, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize_x * 2, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       pos_y += keysize_y;
+       drawpic_aspect_skin(pos + eX * keysize.x, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * keysize.x * 2, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       pos.y += keysize.y;
        drawpic_aspect_skin(pos, ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize_x, ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize_x * 2, ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * keysize.x, ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * keysize.x * 2, ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
 // Handle chat as a panel (#12)
@@ -3535,11 +3536,11 @@ void HUD_Chat(void)
        if (!autocvar_con_chatrect)
                cvar_set("con_chatrect", "1");
 
-       cvar_set("con_chatrect_x", ftos(pos_x/vid_conwidth));
-       cvar_set("con_chatrect_y", ftos(pos_y/vid_conheight));
+       cvar_set("con_chatrect_x", ftos(pos.x/vid_conwidth));
+       cvar_set("con_chatrect_y", ftos(pos.y/vid_conheight));
 
-       cvar_set("con_chatwidth", ftos(mySize_x/vid_conwidth));
-       cvar_set("con_chat", ftos(floor(mySize_y/autocvar_con_chatsize - 0.5)));
+       cvar_set("con_chatwidth", ftos(mySize.x/vid_conwidth));
+       cvar_set("con_chat", ftos(floor(mySize.y/autocvar_con_chatsize - 0.5)));
 
        if(autocvar__hud_configure)
        {
@@ -3553,8 +3554,8 @@ void HUD_Chat(void)
                                a = panel_fg_alpha;
                        else
                                a = panel_fg_alpha * floor(((i + 1) * 7 + autocvar_con_chattime)/45);
-                       drawcolorcodedstring(pos, textShortenToWidth(_("^3Player^7: This is the chat area."), mySize_x, chatsize, stringwidth_colors), chatsize, a, DRAWFLAG_NORMAL);
-                       pos_y += chatsize_y;
+                       drawcolorcodedstring(pos, textShortenToWidth(_("^3Player^7: This is the chat area."), mySize.x, chatsize, stringwidth_colors), chatsize, a, DRAWFLAG_NORMAL);
+                       pos.y += chatsize.y;
                }
        }
 }
@@ -3625,9 +3626,9 @@ void HUD_EngineInfo(void)
 //
 #define drawInfoMessage(s)\
        if(autocvar_hud_panel_infomessages_flip)\
-               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize);\
+               o_x = pos.x + mySize.x - stringwidth(s, TRUE, fontsize);\
        drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);\
-       o_y += fontsize_y;
+       o.y += fontsize.y;
 void HUD_InfoMessages(void)
 {
        if(!autocvar__hud_configure)
@@ -3649,19 +3650,19 @@ void HUD_InfoMessages(void)
 
        // always force 5:1 aspect
        vector newSize = '0 0 0';
-       if(mySize_x/mySize_y > 5)
+       if(mySize.x/mySize.y > 5)
        {
-               newSize_x = 5 * mySize_y;
-               newSize_y = mySize_y;
+               newSize_x = 5 * mySize.y;
+               newSize_y = mySize.y;
 
-               pos_x = pos_x + (mySize_x - newSize_x) / 2;
+               pos_x = pos.x + (mySize.x - newSize.x) / 2;
        }
        else
        {
-               newSize_y = 1/5 * mySize_x;
-               newSize_x = mySize_x;
+               newSize_y = 1/5 * mySize.x;
+               newSize_x = mySize.x;
 
-               pos_y = pos_y + (mySize_y - newSize_y) / 2;
+               pos_y = pos.y + (mySize.y - newSize.y) / 2;
        }
 
        mySize = newSize;
@@ -3670,7 +3671,7 @@ void HUD_InfoMessages(void)
        o = pos;
 
        vector fontsize;
-       fontsize = '0.20 0.20 0' * mySize_y;
+       fontsize = '0.20 0.20 0' * mySize.y;
 
        float a;
        a = panel_fg_alpha;
@@ -3724,7 +3725,7 @@ void HUD_InfoMessages(void)
                                countdown = ceil(getstatf(STAT_GAMESTARTTIME) - time);
                                s = sprintf(_("^1Game starts in ^3%d^1 seconds"), countdown);
                                drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                               o_y += fontsize_y;
+                               o.y += fontsize.y;
                        }
                }
                if(warmup_stage && !intermission)
@@ -3875,7 +3876,7 @@ void HUD_Physics(void)
        else if(autocvar_hud_panel_physics_speed_vertical)
                speed = floor( vlen(vel) * conversion_factor + 0.5 );
        else
-               speed = floor( vlen(vel - vel_z * '0 0 1') * conversion_factor + 0.5 );
+               speed = floor( vlen(vel - vel.z * '0 0 1') * conversion_factor + 0.5 );
 
        //compute acceleration
        float acceleration, f;
@@ -3888,7 +3889,7 @@ void HUD_Physics(void)
                if(autocvar_hud_panel_physics_acceleration_vertical)
                        acceleration = (vlen(vel) - vlen(acc_prevspeed));
                else
-                       acceleration = (vlen(vel - '0 0 1' * vel_z) - vlen(acc_prevspeed - '0 0 1' * acc_prevspeed_z));
+                       acceleration = (vlen(vel - '0 0 1' * vel.z) - vlen(acc_prevspeed - '0 0 1' * acc_prevspeed.z));
 
                acceleration = acceleration * (1 / max(0.0001, f)) * (0.0254 / 9.80665);
 
@@ -3900,23 +3901,23 @@ void HUD_Physics(void)
        }
 
        //compute layout
-       float panel_ar = panel_size_x/panel_size_y;
+       float panel_ar = panel_size.x/panel_size.y;
        vector speed_offset = '0 0 0', acceleration_offset = '0 0 0';
        if (panel_ar >= 5 && !acceleration_progressbar_scale)
        {
-               panel_size_x *= 0.5;
+               panel_size.x *= 0.5;
                if (autocvar_hud_panel_physics_flip)
-                       speed_offset_x = panel_size_x;
+                       speed_offset_x = panel_size.x;
                else
-                       acceleration_offset_x = panel_size_x;
+                       acceleration_offset_x = panel_size.x;
        }
        else
        {
-               panel_size_y *= 0.5;
+               panel_size.y *= 0.5;
                if (autocvar_hud_panel_physics_flip)
-                       speed_offset_y = panel_size_y;
+                       speed_offset_y = panel_size.y;
                else
-                       acceleration_offset_y = panel_size_y;
+                       acceleration_offset_y = panel_size.y;
        }
        float speed_baralign, acceleration_baralign;
        if (autocvar_hud_panel_physics_baralign == 1)
@@ -3943,26 +3944,26 @@ void HUD_Physics(void)
        vector tmp_offset = '0 0 0', tmp_size = '0 0 0';
        if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 2)
        {
-               tmp_size_x = panel_size_x * 0.75;
-               tmp_size_y = panel_size_y * text_scale;
+               tmp_size_x = panel_size.x * 0.75;
+               tmp_size_y = panel_size.y * text_scale;
                if (speed_baralign)
-                       tmp_offset_x = panel_size_x - tmp_size_x;
+                       tmp_offset_x = panel_size.x - tmp_size.x;
                //else
                        //tmp_offset_x = 0;
-               tmp_offset_y = (panel_size_y - tmp_size_y) / 2;
+               tmp_offset_y = (panel_size.y - tmp_size.y) / 2;
                drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(speed), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                //draw speed unit
                if (speed_baralign)
                        tmp_offset_x = 0;
                else
-                       tmp_offset_x = tmp_size_x;
+                       tmp_offset_x = tmp_size.x;
                if (autocvar_hud_panel_physics_speed_unit_show)
                {
                        //tmp_offset_y = 0;
-                       tmp_size_x = panel_size_x * (1 - 0.75);
-                       tmp_size_y = panel_size_y * 0.4 * text_scale;
-                       tmp_offset_y = (panel_size_y * 0.4 - tmp_size_y) / 2;
+                       tmp_size_x = panel_size.x * (1 - 0.75);
+                       tmp_size_y = panel_size.y * 0.4 * text_scale;
+                       tmp_offset_y = (panel_size.y * 0.4 - tmp_size.y) / 2;
                        drawstring_aspect(panel_pos + speed_offset + tmp_offset, unit, tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
        }
@@ -3998,30 +3999,30 @@ void HUD_Physics(void)
                        if(speed < top_speed)
                        if(autocvar_hud_panel_physics_progressbar == 1 || autocvar_hud_panel_physics_progressbar == 2)
                        {
-                               float peak_offset_x;
+                               float peak_offsetX;
                                vector peak_size = '0 0 0';
                                if (speed_baralign == 0)
-                                       peak_offset_x = min(top_speed, max_speed)/max_speed * panel_size_x;
+                                       peak_offsetX = min(top_speed, max_speed)/max_speed * panel_size.x;
                 else if (speed_baralign == 1)
-                                       peak_offset_x = (1 - min(top_speed, max_speed)/max_speed) * panel_size_x;
+                                       peak_offsetX = (1 - min(top_speed, max_speed)/max_speed) * panel_size.x;
                 else // if (speed_baralign == 2)
-                    peak_offset_x = min(top_speed, max_speed)/max_speed * panel_size_x * 0.5;
-                               peak_size_x = floor(panel_size_x * 0.01 + 1.5);
-                peak_size_y = panel_size_y;
+                    peak_offsetX = min(top_speed, max_speed)/max_speed * panel_size.x * 0.5;
+                               peak_size_x = floor(panel_size.x * 0.01 + 1.5);
+                peak_size_y = panel_size.y;
                 if (speed_baralign == 2) // draw two peaks, on both sides
                 {
-                    drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size_x + peak_offset_x - peak_size_x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-                    drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size_x - peak_offset_x + peak_size_x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                    drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size.x + peak_offsetX - peak_size.x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                    drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size.x - peak_offsetX + peak_size.x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                 }
                 else
-                    drawfill(panel_pos + speed_offset + eX * (peak_offset_x - peak_size_x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                    drawfill(panel_pos + speed_offset + eX * (peak_offsetX - peak_size.x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
 
                        //top speed
-                       tmp_offset_y = panel_size_y * 0.4;
-                       tmp_size_x = panel_size_x * (1 - 0.75);
-                       tmp_size_y = (panel_size_y - tmp_offset_y) * text_scale;
-                       tmp_offset_y += (panel_size_y - tmp_offset_y - tmp_size_y) / 2;
+                       tmp_offset_y = panel_size.y * 0.4;
+                       tmp_size_x = panel_size.x * (1 - 0.75);
+                       tmp_size_y = (panel_size.y - tmp_offset.y) * text_scale;
+                       tmp_offset.y += (panel_size.y - tmp_offset.y - tmp_size.y) / 2;
                        drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(top_speed), tmp_size, '1 0 0', f * panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                else
@@ -4044,12 +4045,12 @@ void HUD_Physics(void)
 
                if (acceleration_progressbar_scale) // allow progressbar to go out of panel bounds
                {
-                       tmp_size = acceleration_progressbar_scale * panel_size_x * eX + panel_size_y * eY;
+                       tmp_size = acceleration_progressbar_scale * panel_size.x * eX + panel_size.y * eY;
 
                        if (acceleration_baralign == 1)
-                               tmp_offset_x = panel_size_x - tmp_size_x;
+                               tmp_offset_x = panel_size.x - tmp_size.x;
                        else if (acceleration_baralign == 2 || acceleration_baralign == 3)
-                               tmp_offset_x = (panel_size_x - tmp_size_x) / 2;
+                               tmp_offset_x = (panel_size.x - tmp_size.x) / 2;
                        else
                                tmp_offset_x = 0;
                        tmp_offset_y = 0;
@@ -4062,10 +4063,10 @@ void HUD_Physics(void)
 
                HUD_Panel_DrawProgressBar(panel_pos + acceleration_offset + tmp_offset, tmp_size, "accelbar", f, 0, acceleration_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
        }
-       tmp_size_x = panel_size_x;
-       tmp_size_y = panel_size_y * text_scale;
+       tmp_size_x = panel_size.x;
+       tmp_size_y = panel_size.y * text_scale;
        tmp_offset_x = 0;
-       tmp_offset_y = (panel_size_y - tmp_size_y) / 2;
+       tmp_offset_y = (panel_size.y - tmp_size.y) / 2;
        if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 3)
                drawstring_aspect(panel_pos + acceleration_offset + tmp_offset, strcat(ftos_decimals(acceleration, 2), "g"), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
@@ -4225,12 +4226,12 @@ void HUD_CenterPrint (void)
                        return;
                vector target_pos;
 
-               target_pos = eY * scoreboard_bottom + eX * 0.5 * (vid_conwidth - panel_size_x);
+               target_pos = eY * scoreboard_bottom + eX * 0.5 * (vid_conwidth - panel_size.x);
 
-               if(target_pos_y > panel_pos_y)
+               if(target_pos.y > panel_pos.y)
                {
                        panel_pos = panel_pos + (target_pos - panel_pos) * sqrt(scoreboard_fade_alpha);
-                       panel_size_y = min(panel_size_y, vid_conheight - scoreboard_bottom);
+                       panel_size_y = min(panel_size.y, vid_conheight - scoreboard_bottom);
                }
        }
 
@@ -4252,17 +4253,17 @@ void HUD_CenterPrint (void)
        // fontsize = '1 1 0' * height;
        height = vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale;
        fontsize = '1 1 0' * height;
-       entries = bound(1, floor(panel_size_y/height), CENTERPRINT_MAX_ENTRIES);
+       entries = bound(1, floor(panel_size.y/height), CENTERPRINT_MAX_ENTRIES);
 
        float i, j, k, n, g;
-       float a, sz, align, current_msg_pos_y = 0, msg_size;
+       float a, sz, align, current_msg_posY = 0, msg_size;
        vector pos;
        string ts;
        float all_messages_expired = TRUE;
 
        pos = panel_pos;
        if (autocvar_hud_panel_centerprint_flip)
-               pos_y += panel_size_y;
+               pos.y += panel_size.y;
        align = bound(0, autocvar_hud_panel_centerprint_align, 1);
        for (g=0, i=0, j=cpm_index; i<CENTERPRINT_MAX_MSGS; ++i, ++j)
        {
@@ -4325,46 +4326,46 @@ void HUD_CenterPrint (void)
                                getWrappedLine_remaining = argv(k);
                                while(getWrappedLine_remaining)
                                {
-                                       ts = getWrappedLine(panel_size_x * sz, fontsize, stringwidth_colors);
+                                       ts = getWrappedLine(panel_size.x * sz, fontsize, stringwidth_colors);
                                        if (ts != "")
-                                               pos_y -= fontsize_y;
+                                               pos.y -= fontsize.y;
                                        else
-                                               pos_y -= fontsize_y * CENTERPRINT_SPACING/2;
+                                               pos.y -= fontsize.y * CENTERPRINT_SPACING/2;
                                }
                        }
-                       current_msg_pos_y = pos_y; // save starting pos (first line) of the current message
+                       current_msg_posY = pos.y; // save starting pos (first line) of the current message
                }
 
-               msg_size = pos_y;
+               msg_size = pos.y;
                for(k = 0; k < n; ++k)
                {
                        getWrappedLine_remaining = argv(k);
                        while(getWrappedLine_remaining)
                        {
-                               ts = getWrappedLine(panel_size_x * sz, fontsize, stringwidth_colors);
+                               ts = getWrappedLine(panel_size.x * sz, fontsize, stringwidth_colors);
                                if (ts != "")
                                {
                                        if (align)
-                                               pos_x = panel_pos_x + (panel_size_x - stringwidth(ts, TRUE, fontsize)) * align;
+                                               pos_x = panel_pos.x + (panel_size.x - stringwidth(ts, TRUE, fontsize)) * align;
                                        if (a > 0.5/255.0)  // Otherwise guaranteed invisible - don't show. This is checked a second time after some multiplications with other factors were done so temporary changes of these cannot cause flicker.
-                                               drawcolorcodedstring(pos + eY * 0.5 * (1 - sz) * fontsize_y, ts, fontsize, a, DRAWFLAG_NORMAL);
-                                       pos_y += fontsize_y;
+                                               drawcolorcodedstring(pos + eY * 0.5 * (1 - sz) * fontsize.y, ts, fontsize, a, DRAWFLAG_NORMAL);
+                                       pos.y += fontsize.y;
                                }
                                else
-                                       pos_y += fontsize_y * CENTERPRINT_SPACING/2;
+                                       pos.y += fontsize.y * CENTERPRINT_SPACING/2;
                        }
                }
 
                ++g; // move next position number up
 
-               msg_size = pos_y - msg_size;
+               msg_size = pos.y - msg_size;
                if (autocvar_hud_panel_centerprint_flip)
                {
-                       pos_y = current_msg_pos_y - CENTERPRINT_SPACING * fontsize_y;
+                       pos_y = current_msg_posY - CENTERPRINT_SPACING * fontsize.y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
-                               pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz));
+                               pos.y += (msg_size + CENTERPRINT_SPACING * fontsize.y) * (1 - sqrt(sz));
 
-                       if (pos_y < panel_pos_y) // check if the next message can be shown
+                       if (pos.y < panel_pos.y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
                                return;
@@ -4372,11 +4373,11 @@ void HUD_CenterPrint (void)
                }
                else
                {
-                       pos_y += CENTERPRINT_SPACING * fontsize_y;
+                       pos.y += CENTERPRINT_SPACING * fontsize.y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
-                               pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz));
+                               pos.y -= (msg_size + CENTERPRINT_SPACING * fontsize.y) * (1 - sqrt(sz));
 
-                       if(pos_y > panel_pos_y + panel_size_y - fontsize_y) // check if the next message can be shown
+                       if(pos.y > panel_pos.y + panel_size.y - fontsize.y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
                                return;
index d36e7d8..43e8e57 100644 (file)
@@ -217,7 +217,7 @@ void HUD_Configure_Exit_Force()
 // check if move will result in panel being moved into another panel. If so, return snapped vector, otherwise return the given vector
 vector HUD_Panel_CheckMove(vector myPos, vector mySize)
 {
-       float myCenter_x, myCenter_y, targCenter_x, targCenter_y;
+       vector myCenter, targCenter;
        vector myTarget = myPos;
        int i;
        for (i = 0; i < HUD_PANEL_NUM; ++i) {
@@ -229,51 +229,51 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
                panel_pos -= '1 1 0' * panel_bg_border;
                panel_size += '2 2 0' * panel_bg_border;
 
-               if(myPos_y + mySize_y < panel_pos_y)
+               if(myPos.y + mySize.y < panel_pos.y)
                        continue;
-               if(myPos_y > panel_pos_y + panel_size_y)
+               if(myPos.y > panel_pos.y + panel_size.y)
                        continue;
 
-               if(myPos_x + mySize_x < panel_pos_x)
+               if(myPos.x + mySize.x < panel_pos.x)
                        continue;
-               if(myPos_x > panel_pos_x + panel_size_x)
+               if(myPos.x > panel_pos.x + panel_size.x)
                        continue;
 
                // OK, there IS a collision.
 
-               myCenter_x = myPos_x + 0.5 * mySize_x;
-               myCenter_y = myPos_y + 0.5 * mySize_y;
+               myCenter_x = myPos.x + 0.5 * mySize.x;
+               myCenter_y = myPos.y + 0.5 * mySize.y;
 
-               targCenter_x = panel_pos_x + 0.5 * panel_size_x;
-               targCenter_y = panel_pos_y + 0.5 * panel_size_y;
+               targCenter_x = panel_pos.x + 0.5 * panel_size.x;
+               targCenter_y = panel_pos.y + 0.5 * panel_size.y;
 
-               if(myCenter_x < targCenter_x && myCenter_y < targCenter_y) // top left (of the target panel)
+               if(myCenter.x < targCenter.x && myCenter.y < targCenter.y) // top left (of the target panel)
                {
-                       if(myPos_x + mySize_x - panel_pos_x < myPos_y + mySize_y - panel_pos_y) // push it to the side
-                               myTarget_x = panel_pos_x - mySize_x;
+                       if(myPos.x + mySize.x - panel_pos.x < myPos.y + mySize.y - panel_pos.y) // push it to the side
+                               myTarget_x = panel_pos.x - mySize.x;
                        else // push it upwards
-                               myTarget_y = panel_pos_y - mySize_y;
+                               myTarget_y = panel_pos.y - mySize.y;
                }
-               else if(myCenter_x > targCenter_x && myCenter_y < targCenter_y) // top right
+               else if(myCenter.x > targCenter.x && myCenter.y < targCenter.y) // top right
                {
-                       if(panel_pos_x + panel_size_x - myPos_x < myPos_y + mySize_y - panel_pos_y) // push it to the side
-                               myTarget_x = panel_pos_x + panel_size_x;
+                       if(panel_pos.x + panel_size.x - myPos.x < myPos.y + mySize.y - panel_pos.y) // push it to the side
+                               myTarget_x = panel_pos.x + panel_size.x;
                        else // push it upwards
-                               myTarget_y = panel_pos_y - mySize_y;
+                               myTarget_y = panel_pos.y - mySize.y;
                }
-               else if(myCenter_x < targCenter_x && myCenter_y > targCenter_y) // bottom left
+               else if(myCenter.x < targCenter.x && myCenter.y > targCenter.y) // bottom left
                {
-                       if(myPos_x + mySize_x - panel_pos_x < panel_pos_y + panel_size_y - myPos_y) // push it to the side
-                               myTarget_x = panel_pos_x - mySize_x;
+                       if(myPos.x + mySize.x - panel_pos.x < panel_pos.y + panel_size.y - myPos.y) // push it to the side
+                               myTarget_x = panel_pos.x - mySize.x;
                        else // push it downwards
-                               myTarget_y = panel_pos_y + panel_size_y;
+                               myTarget_y = panel_pos.y + panel_size.y;
                }
-               else if(myCenter_x > targCenter_x && myCenter_y > targCenter_y) // bottom right
+               else if(myCenter.x > targCenter.x && myCenter.y > targCenter.y) // bottom right
                {
-                       if(panel_pos_x + panel_size_x - myPos_x < panel_pos_y + panel_size_y - myPos_y) // push it to the side
-                               myTarget_x = panel_pos_x + panel_size_x;
+                       if(panel_pos.x + panel_size.x - myPos.x < panel_pos.y + panel_size.y - myPos.y) // push it to the side
+                               myTarget_x = panel_pos.x + panel_size.x;
                        else // push it downwards
-                               myTarget_y = panel_pos_y + panel_size_y;
+                               myTarget_y = panel_pos.y + panel_size.y;
                }
                //if(cvar("hud_configure_checkcollisions_debug"))
                        //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
@@ -294,18 +294,18 @@ void HUD_Panel_SetPos(vector pos)
 
        if(autocvar_hud_configure_grid)
        {
-               pos_x = floor((pos_x/vid_conwidth)/hud_configure_gridSize_x + 0.5) * hud_configure_realGridSize_x;
-               pos_y = floor((pos_y/vid_conheight)/hud_configure_gridSize_y + 0.5) * hud_configure_realGridSize_y;
+               pos_x = floor((pos.x/vid_conwidth)/hud_configure_gridSize.x + 0.5) * hud_configure_realGridSize.x;
+               pos_y = floor((pos.y/vid_conheight)/hud_configure_gridSize.y + 0.5) * hud_configure_realGridSize.y;
        }
 
        if(hud_configure_checkcollisions)
                pos = HUD_Panel_CheckMove(pos, mySize);
 
-       pos_x = bound(0, pos_x, vid_conwidth - mySize_x);
-       pos_y = bound(0, pos_y, vid_conheight - mySize_y);
+       pos_x = bound(0, pos.x, vid_conwidth - mySize.x);
+       pos_y = bound(0, pos.y, vid_conheight - mySize.y);
 
        string s;
-       s = strcat(ftos(pos_x/vid_conwidth), " ", ftos(pos_y/vid_conheight));
+       s = strcat(ftos(pos.x/vid_conwidth), " ", ftos(pos.y/vid_conheight));
 
        cvar_set(strcat("hud_panel_", highlightedPanel.panel_name, "_pos"), s);
 }
@@ -316,9 +316,9 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
 
        vector targEndPos;
 
-       float dist_x, dist_y;
+       vector dist;
        float ratio;
-       ratio = mySize_x/mySize_y;
+       ratio = mySize.x/mySize.y;
 
        for (i = 0; i < HUD_PANEL_NUM; ++i) {
                panel = hud_panel[i];
@@ -332,19 +332,19 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                targEndPos = panel_pos + panel_size;
 
                // resizeorigin is WITHIN target panel, just abort any collision testing against that particular panel to produce expected behaviour!
-               if(resizeorigin_x > panel_pos_x && resizeorigin_x < targEndPos_x && resizeorigin_y > panel_pos_y && resizeorigin_y < targEndPos_y)
+               if(resizeorigin.x > panel_pos.x && resizeorigin.x < targEndPos.x && resizeorigin.y > panel_pos.y && resizeorigin.y < targEndPos.y)
                        continue;
 
                if (resizeCorner == 1)
                {
                        // check if this panel is on our way
-                       if (resizeorigin_x <= panel_pos_x)
+                       if (resizeorigin.x <= panel_pos.x)
                                continue;
-                       if (resizeorigin_y <= panel_pos_y)
+                       if (resizeorigin.y <= panel_pos.y)
                                continue;
-                       if (targEndPos_x <= resizeorigin_x - mySize_x)
+                       if (targEndPos.x <= resizeorigin.x - mySize.x)
                                continue;
-                       if (targEndPos_y <= resizeorigin_y - mySize_y)
+                       if (targEndPos.y <= resizeorigin.y - mySize.y)
                                continue;
 
                        // there is a collision:
@@ -353,66 +353,66 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                        //
                        // dist is the distance between resizeorigin and the "analogous" point of the panel
                        // in this case between resizeorigin (bottom-right point) and the bottom-right point of the panel
-                       dist_x = resizeorigin_x - targEndPos_x;
-                       dist_y = resizeorigin_y - targEndPos_y;
-                       if (dist_y <= 0 || dist_x / dist_y > ratio)
-                               mySize_x = min(mySize_x, dist_x);
+                       dist_x = resizeorigin.x - targEndPos.x;
+                       dist_y = resizeorigin.y - targEndPos.y;
+                       if (dist.y <= 0 || dist.x / dist.y > ratio)
+                               mySize_x = min(mySize.x, dist.x);
                        else
-                               mySize_y = min(mySize_y, dist_y);
+                               mySize_y = min(mySize.y, dist.y);
                }
                else if (resizeCorner == 2)
                {
-                       if (resizeorigin_x >= targEndPos_x)
+                       if (resizeorigin.x >= targEndPos.x)
                                continue;
-                       if (resizeorigin_y <= panel_pos_y)
+                       if (resizeorigin.y <= panel_pos.y)
                                continue;
-                       if (panel_pos_x >= resizeorigin_x + mySize_x)
+                       if (panel_pos.x >= resizeorigin.x + mySize.x)
                                continue;
-                       if (targEndPos_y <= resizeorigin_y - mySize_y)
+                       if (targEndPos.y <= resizeorigin.y - mySize.y)
                                continue;
 
-                       dist_x = panel_pos_x - resizeorigin_x;
-                       dist_y = resizeorigin_y - targEndPos_y;
-                       if (dist_y <= 0 || dist_x / dist_y > ratio)
-                               mySize_x = min(mySize_x, dist_x);
+                       dist_x = panel_pos.x - resizeorigin.x;
+                       dist_y = resizeorigin.y - targEndPos.y;
+                       if (dist.y <= 0 || dist.x / dist.y > ratio)
+                               mySize_x = min(mySize.x, dist.x);
                        else
-                               mySize_y = min(mySize_y, dist_y);
+                               mySize_y = min(mySize.y, dist.y);
                }
                else if (resizeCorner == 3)
                {
-                       if (resizeorigin_x <= panel_pos_x)
+                       if (resizeorigin.x <= panel_pos.x)
                                continue;
-                       if (resizeorigin_y >= targEndPos_y)
+                       if (resizeorigin.y >= targEndPos.y)
                                continue;
-                       if (targEndPos_x <= resizeorigin_x - mySize_x)
+                       if (targEndPos.x <= resizeorigin.x - mySize.x)
                                continue;
-                       if (panel_pos_y >= resizeorigin_y + mySize_y)
+                       if (panel_pos.y >= resizeorigin.y + mySize.y)
                                continue;
 
-                       dist_x = resizeorigin_x - targEndPos_x;
-                       dist_y = panel_pos_y - resizeorigin_y;
-                       if (dist_y <= 0 || dist_x / dist_y > ratio)
-                               mySize_x = min(mySize_x, dist_x);
+                       dist_x = resizeorigin.x - targEndPos.x;
+                       dist_y = panel_pos.y - resizeorigin.y;
+                       if (dist.y <= 0 || dist.x / dist.y > ratio)
+                               mySize_x = min(mySize.x, dist.x);
                        else
-                               mySize_y = min(mySize_y, dist_y);
+                               mySize_y = min(mySize.y, dist.y);
                }
                else if (resizeCorner == 4)
                {
-                       if (resizeorigin_x >= targEndPos_x)
+                       if (resizeorigin.x >= targEndPos.x)
                                continue;
-                       if (resizeorigin_y >= targEndPos_y)
+                       if (resizeorigin.y >= targEndPos.y)
                                continue;
-                       if (panel_pos_x >= resizeorigin_x + mySize_x)
+                       if (panel_pos.x >= resizeorigin.x + mySize.x)
                                continue;
-                       if (panel_pos_y >= resizeorigin_y + mySize_y)
+                       if (panel_pos.y >= resizeorigin.y + mySize.y)
                                continue;
 
-                       dist_x = panel_pos_x - resizeorigin_x;
-                       dist_y = panel_pos_y - resizeorigin_y;
-                       if (dist_y <= 0 || dist_x / dist_y > ratio)
-                               mySize_x = min(mySize_x, dist_x);
+                       dist_x = panel_pos.x - resizeorigin.x;
+                       dist_y = panel_pos.y - resizeorigin.y;
+                       if (dist.y <= 0 || dist.x / dist.y > ratio)
+                               mySize_x = min(mySize.x, dist.x);
                        else
-                               mySize_y = min(mySize_y, dist_y);
+                               mySize_y = min(mySize.y, dist.y);
                }
                //if(cvar("hud_configure_checkcollisions_debug"))
                        //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
@@ -430,13 +430,13 @@ void HUD_Panel_SetPosSize(vector mySize)
        vector myPos;
 
        // minimum panel size cap
-       mySize_x = max(0.025 * vid_conwidth, mySize_x);
-       mySize_y = max(0.025 * vid_conheight, mySize_y);
+       mySize_x = max(0.025 * vid_conwidth, mySize.x);
+       mySize_y = max(0.025 * vid_conheight, mySize.y);
 
        if(highlightedPanel == HUD_PANEL(CHAT)) // some panels have their own restrictions, like the chat panel (which actually only moves the engine chat print around). Looks bad if it's too small.
        {
-               mySize_x = max(17 * autocvar_con_chatsize, mySize_x);
-               mySize_y = max(2 * autocvar_con_chatsize + 2 * panel_bg_padding, mySize_y);
+               mySize_x = max(17 * autocvar_con_chatsize, mySize.x);
+               mySize_y = max(2 * autocvar_con_chatsize + 2 * panel_bg_padding, mySize.y);
        }
 
        // collision testing|
@@ -444,30 +444,30 @@ void HUD_Panel_SetPosSize(vector mySize)
 
        // we need to know pos at this stage, but it might still change later if we hit a screen edge/other panel (?)
        if(resizeCorner == 1) {
-               myPos_x = resizeorigin_x - mySize_x;
-               myPos_y = resizeorigin_y - mySize_y;
+               myPos_x = resizeorigin.x - mySize.x;
+               myPos_y = resizeorigin.y - mySize.y;
        } else if(resizeCorner == 2) {
-               myPos_x = resizeorigin_x;
-               myPos_y = resizeorigin_y - mySize_y;
+               myPos_x = resizeorigin.x;
+               myPos_y = resizeorigin.y - mySize.y;
        } else if(resizeCorner == 3) {
-               myPos_x = resizeorigin_x - mySize_x;
-               myPos_y = resizeorigin_y;
+               myPos_x = resizeorigin.x - mySize.x;
+               myPos_y = resizeorigin.y;
        } else { // resizeCorner == 4
-               myPos_x = resizeorigin_x;
-               myPos_y = resizeorigin_y;
+               myPos_x = resizeorigin.x;
+               myPos_y = resizeorigin.y;
        }
 
        // left/top screen edges
-       if(myPos_x < 0)
-               mySize_x = mySize_x + myPos_x;
-       if(myPos_y < 0)
-               mySize_y = mySize_y + myPos_y;
+       if(myPos.x < 0)
+               mySize_x = mySize.x + myPos.x;
+       if(myPos.y < 0)
+               mySize_y = mySize.y + myPos.y;
 
        // bottom/right screen edges
-       if(myPos_x + mySize_x > vid_conwidth)
-               mySize_x = vid_conwidth - myPos_x;
-       if(myPos_y + mySize_y > vid_conheight)
-               mySize_y = vid_conheight - myPos_y;
+       if(myPos.x + mySize.x > vid_conwidth)
+               mySize_x = vid_conwidth - myPos.x;
+       if(myPos.y + mySize.y > vid_conheight)
+               mySize_y = vid_conheight - myPos.y;
 
        //if(cvar("hud_configure_checkcollisions_debug"))
                //drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
@@ -475,40 +475,40 @@ void HUD_Panel_SetPosSize(vector mySize)
        // before checkresize, otherwise panel can be snapped partially inside another panel or panel aspect ratio can be broken
        if(autocvar_hud_configure_grid)
        {
-               mySize_x = floor((mySize_x/vid_conwidth)/hud_configure_gridSize_x + 0.5) * hud_configure_realGridSize_x;
-               mySize_y = floor((mySize_y/vid_conheight)/hud_configure_gridSize_y + 0.5) * hud_configure_realGridSize_y;
+               mySize_x = floor((mySize.x/vid_conwidth)/hud_configure_gridSize.x + 0.5) * hud_configure_realGridSize.x;
+               mySize_y = floor((mySize.y/vid_conheight)/hud_configure_gridSize.y + 0.5) * hud_configure_realGridSize.y;
        }
 
        if(hud_configure_checkcollisions)
                mySize = HUD_Panel_CheckResize(mySize, resizeorigin);
 
        // minimum panel size cap, do this once more so we NEVER EVER EVER have a panel smaller than this, JUST IN CASE above code still makes the panel eg negative (impossible to resize back without changing cvars manually then)
-       mySize_x = max(0.025 * vid_conwidth, mySize_x);
-       mySize_y = max(0.025 * vid_conheight, mySize_y);
+       mySize_x = max(0.025 * vid_conwidth, mySize.x);
+       mySize_y = max(0.025 * vid_conheight, mySize.y);
 
        // do another pos check, as size might have changed by now
        if(resizeCorner == 1) {
-               myPos_x = resizeorigin_x - mySize_x;
-               myPos_y = resizeorigin_y - mySize_y;
+               myPos_x = resizeorigin.x - mySize.x;
+               myPos_y = resizeorigin.y - mySize.y;
        } else if(resizeCorner == 2) {
-               myPos_x = resizeorigin_x;
-               myPos_y = resizeorigin_y - mySize_y;
+               myPos_x = resizeorigin.x;
+               myPos_y = resizeorigin.y - mySize.y;
        } else if(resizeCorner == 3) {
-               myPos_x = resizeorigin_x - mySize_x;
-               myPos_y = resizeorigin_y;
+               myPos_x = resizeorigin.x - mySize.x;
+               myPos_y = resizeorigin.y;
        } else { // resizeCorner == 4
-               myPos_x = resizeorigin_x;
-               myPos_y = resizeorigin_y;
+               myPos_x = resizeorigin.x;
+               myPos_y = resizeorigin.y;
        }
 
        //if(cvar("hud_configure_checkcollisions_debug"))
                //drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
 
        string s;
-       s = strcat(ftos(mySize_x/vid_conwidth), " ", ftos(mySize_y/vid_conheight));
+       s = strcat(ftos(mySize.x/vid_conwidth), " ", ftos(mySize.y/vid_conheight));
        cvar_set(strcat("hud_panel_", highlightedPanel.panel_name, "_size"), s);
 
-       s = strcat(ftos(myPos_x/vid_conwidth), " ", ftos(myPos_y/vid_conheight));
+       s = strcat(ftos(myPos.x/vid_conwidth), " ", ftos(myPos.y/vid_conheight));
        cvar_set(strcat("hud_panel_", highlightedPanel.panel_name, "_pos"), s);
 }
 
@@ -527,16 +527,16 @@ void HUD_Panel_Arrow_Action(float nPrimary)
                if (nPrimary == K_UPARROW || nPrimary == K_DOWNARROW)
                {
                        if (hudShiftState & S_SHIFT)
-                               step = hud_configure_realGridSize_y;
+                               step = hud_configure_realGridSize.y;
                        else
-                               step = 2 * hud_configure_realGridSize_y;
+                               step = 2 * hud_configure_realGridSize.y;
                }
                else
                {
                        if (hudShiftState & S_SHIFT)
-                               step = hud_configure_realGridSize_x;
+                               step = hud_configure_realGridSize.x;
                        else
-                               step = 2 * hud_configure_realGridSize_x;
+                               step = 2 * hud_configure_realGridSize.x;
                }
        }
        else
@@ -582,15 +582,15 @@ void HUD_Panel_Arrow_Action(float nPrimary)
                panel_click_resizeorigin = panel_pos;
                if(resizeCorner == 1) {
                        panel_click_resizeorigin += mySize;
-                       mySize_y += step;
+                       mySize.y += step;
                } else if(resizeCorner == 2) {
-                       panel_click_resizeorigin_y += mySize_y;
-                       mySize_x += step;
+                       panel_click_resizeorigin.y += mySize.y;
+                       mySize.x += step;
                } else if(resizeCorner == 3) {
-                       panel_click_resizeorigin_x += mySize_x;
-                       mySize_x += step;
+                       panel_click_resizeorigin.x += mySize.x;
+                       mySize.x += step;
                } else { // resizeCorner == 4
-                       mySize_y += step;
+                       mySize.y += step;
                }
                HUD_Panel_SetPosSize(mySize);
        }
@@ -600,13 +600,13 @@ void HUD_Panel_Arrow_Action(float nPrimary)
                vector pos;
                pos = panel_pos;
                if(nPrimary == K_UPARROW)
-                       pos_y -= step;
+                       pos.y -= step;
                else if(nPrimary == K_DOWNARROW)
-                       pos_y += step;
+                       pos.y += step;
                else if(nPrimary == K_LEFTARROW)
-                       pos_x -= step;
+                       pos.x -= step;
                else // if(nPrimary == K_RIGHTARROW)
-                       pos_x += step;
+                       pos.x += step;
 
                HUD_Panel_SetPos(pos);
        }
@@ -769,14 +769,14 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                }
                tab_backward = (hudShiftState & S_SHIFT);
 
-               float k, level = 0, start_pos_x;
+               float k, level = 0, start_posX;
                vector candidate_pos = '0 0 0';
                const float LEVELS_NUM = 4;
                float level_height = vid_conheight / LEVELS_NUM;
 :find_tab_panel
-               level = floor(tab_panel_pos_y / level_height) * level_height; //starting level
+               level = floor(tab_panel_pos.y / level_height) * level_height; //starting level
                candidate_pos_x = (!tab_backward) ? vid_conwidth : 0;
-               start_pos_x = tab_panel_pos_x;
+               start_posX = tab_panel_pos.x;
                tab_panel = world;
                k=0;
                while(++k)
@@ -787,9 +787,9 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                                if (panel == tab_panels[i] || panel == starting_panel)
                                        continue;
                                HUD_Panel_UpdatePosSize()
-                               if (panel_pos_y >= level && (panel_pos_y - level) < level_height)
-                               if (  ( !tab_backward && panel_pos_x >= start_pos_x && (panel_pos_x < candidate_pos_x || (panel_pos_x == candidate_pos_x && panel_pos_y <= candidate_pos_y)) )
-                                       || ( tab_backward && panel_pos_x <= start_pos_x && (panel_pos_x > candidate_pos_x || (panel_pos_x == candidate_pos_x && panel_pos_y >= candidate_pos_y)) )  )
+                               if (panel_pos.y >= level && (panel_pos.y - level) < level_height)
+                               if (  ( !tab_backward && panel_pos.x >= start_posX && (panel_pos.x < candidate_pos.x || (panel_pos_x == candidate_pos.x && panel_pos.y <= candidate_pos.y)) )
+                                       || ( tab_backward && panel_pos.x <= start_posX && (panel_pos.x > candidate_pos.x || (panel_pos_x == candidate_pos.x && panel_pos.y >= candidate_pos.y)) )  )
                                {
                                        tab_panel = panel;
                                        tab_panel_pos = candidate_pos = panel_pos;
@@ -812,13 +812,13 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        if (!tab_backward)
                        {
                                level = (level + level_height) % vid_conheight;
-                               start_pos_x = 0;
+                               start_posX = 0;
                                candidate_pos_x = vid_conwidth;
                        }
                        else
                        {
                                level = (level - level_height) % vid_conheight;
-                               start_pos_x = vid_conwidth;
+                               start_posX = vid_conwidth;
                                candidate_pos_x = 0;
                        }
                }
@@ -860,10 +860,10 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 
                // reduce size if it'd go beyond screen boundaries
                vector tmp_size = panel_size_copied;
-               if (panel_pos_x + panel_size_copied_x > vid_conwidth)
-                       tmp_size_x = vid_conwidth - panel_pos_x;
-               if (panel_pos_y + panel_size_copied_y > vid_conheight)
-                       tmp_size_y = vid_conheight - panel_pos_y;
+               if (panel_pos.x + panel_size_copied.x > vid_conwidth)
+                       tmp_size_x = vid_conwidth - panel_pos.x;
+               if (panel_pos.y + panel_size_copied.y > vid_conheight)
+                       tmp_size_y = vid_conheight - panel_pos.y;
 
                if (panel_size == tmp_size)
                        return true;
@@ -873,7 +873,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                panel_size_backup = panel_size;
                highlightedPanel_backup = highlightedPanel;
 
-               s = strcat(ftos(tmp_size_x/vid_conwidth), " ", ftos(tmp_size_y/vid_conheight));
+               s = strcat(ftos(tmp_size.x/vid_conwidth), " ", ftos(tmp_size.y/vid_conheight));
                cvar_set(strcat("hud_panel_", highlightedPanel.panel_name, "_size"), s);
        }
        else if(nPrimary == 'z' && hudShiftState & S_CTRL) // undo last action
@@ -883,9 +883,9 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                //restore previous values
                if (highlightedPanel_backup)
                {
-                       s = strcat(ftos(panel_pos_backup_x/vid_conwidth), " ", ftos(panel_pos_backup_y/vid_conheight));
+                       s = strcat(ftos(panel_pos_backup.x/vid_conwidth), " ", ftos(panel_pos_backup.y/vid_conheight));
                        cvar_set(strcat("hud_panel_", highlightedPanel_backup.panel_name, "_pos"), s);
-                       s = strcat(ftos(panel_size_backup_x/vid_conwidth), " ", ftos(panel_size_backup_y/vid_conheight));
+                       s = strcat(ftos(panel_size_backup.x/vid_conwidth), " ", ftos(panel_size_backup.y/vid_conheight));
                        cvar_set(strcat("hud_panel_", highlightedPanel_backup.panel_name, "_size"), s);
                        highlightedPanel_backup = world;
                }
@@ -931,27 +931,27 @@ float HUD_Panel_Check_Mouse_Pos(float allow_move)
                border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
 
                // move
-               if(allow_move && mousepos_x > panel_pos_x && mousepos_y > panel_pos_y && mousepos_x < panel_pos_x + panel_size_x && mousepos_y < panel_pos_y + panel_size_y)
+               if(allow_move && mousepos.x > panel_pos.x && mousepos.y > panel_pos.y && mousepos.x < panel_pos.x + panel_size.x && mousepos.y < panel_pos.y + panel_size.y)
                {
                        return 1;
                }
                // resize from topleft border
-               else if(mousepos_x >= panel_pos_x - border && mousepos_y >= panel_pos_y - border && mousepos_x <= panel_pos_x + 0.5 * panel_size_x && mousepos_y <= panel_pos_y + 0.5 * panel_size_y)
+               else if(mousepos.x >= panel_pos.x - border && mousepos.y >= panel_pos.y - border && mousepos.x <= panel_pos.x + 0.5 * panel_size.x && mousepos.y <= panel_pos.y + 0.5 * panel_size.y)
                {
                        return 2;
                }
                // resize from topright border
-               else if(mousepos_x >= panel_pos_x + 0.5 * panel_size_x && mousepos_y >= panel_pos_y - border && mousepos_x <= panel_pos_x + panel_size_x + border && mousepos_y <= panel_pos_y + 0.5 * panel_size_y)
+               else if(mousepos.x >= panel_pos.x + 0.5 * panel_size.x && mousepos.y >= panel_pos.y - border && mousepos.x <= panel_pos.x + panel_size.x + border && mousepos.y <= panel_pos.y + 0.5 * panel_size.y)
                {
                        return 3;
                }
                // resize from bottomleft border
-               else if(mousepos_x >= panel_pos_x - border && mousepos_y >= panel_pos_y + 0.5 * panel_size_y && mousepos_x <= panel_pos_x + 0.5 * panel_size_x && mousepos_y <= panel_pos_y + panel_size_y + border)
+               else if(mousepos.x >= panel_pos.x - border && mousepos.y >= panel_pos.y + 0.5 * panel_size.y && mousepos.x <= panel_pos.x + 0.5 * panel_size.x && mousepos.y <= panel_pos.y + panel_size.y + border)
                {
                        return 3;
                }
                // resize from bottomright border
-               else if(mousepos_x >= panel_pos_x + 0.5 * panel_size_x && mousepos_y >= panel_pos_y + 0.5 * panel_size_y && mousepos_x <= panel_pos_x + panel_size_x + border && mousepos_y <= panel_pos_y + panel_size_y + border)
+               else if(mousepos.x >= panel_pos.x + 0.5 * panel_size.x && mousepos.y >= panel_pos.y + 0.5 * panel_size.y && mousepos.x <= panel_pos.x + panel_size.x + border && mousepos.y <= panel_pos.y + panel_size.y + border)
                {
                        return 2;
                }
@@ -1012,7 +1012,7 @@ void HUD_Panel_Highlight(float allow_move)
                border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
 
                // move
-               if(allow_move && mousepos_x > panel_pos_x && mousepos_y > panel_pos_y && mousepos_x < panel_pos_x + panel_size_x && mousepos_y < panel_pos_y + panel_size_y)
+               if(allow_move && mousepos.x > panel_pos.x && mousepos.y > panel_pos.y && mousepos.x < panel_pos.x + panel_size.x && mousepos.y < panel_pos.y + panel_size.y)
                {
                        highlightedPanel = hud_panel[i];
                        HUD_Panel_FirstInDrawQ(i);
@@ -1021,7 +1021,7 @@ void HUD_Panel_Highlight(float allow_move)
                        return;
                }
                // resize from topleft border
-               else if(mousepos_x >= panel_pos_x - border && mousepos_y >= panel_pos_y - border && mousepos_x <= panel_pos_x + 0.5 * panel_size_x && mousepos_y <= panel_pos_y + 0.5 * panel_size_y)
+               else if(mousepos.x >= panel_pos.x - border && mousepos.y >= panel_pos.y - border && mousepos.x <= panel_pos.x + 0.5 * panel_size.x && mousepos.y <= panel_pos.y + 0.5 * panel_size.y)
                {
                        highlightedPanel = hud_panel[i];
                        HUD_Panel_FirstInDrawQ(i);
@@ -1032,31 +1032,31 @@ void HUD_Panel_Highlight(float allow_move)
                        return;
                }
                // resize from topright border
-               else if(mousepos_x >= panel_pos_x + 0.5 * panel_size_x && mousepos_y >= panel_pos_y - border && mousepos_x <= panel_pos_x + panel_size_x + border && mousepos_y <= panel_pos_y + 0.5 * panel_size_y)
+               else if(mousepos.x >= panel_pos.x + 0.5 * panel_size.x && mousepos.y >= panel_pos.y - border && mousepos.x <= panel_pos.x + panel_size.x + border && mousepos.y <= panel_pos.y + 0.5 * panel_size.y)
                {
                        highlightedPanel = hud_panel[i];
                        HUD_Panel_FirstInDrawQ(i);
                        highlightedAction = 2;
                        resizeCorner = 2;
-                       panel_click_distance_x = panel_size_x - mousepos_x + panel_pos_x;
-                       panel_click_distance_y = mousepos_y - panel_pos_y;
-                       panel_click_resizeorigin = panel_pos + eY * panel_size_y;
+                       panel_click_distance_x = panel_size.x - mousepos.x + panel_pos.x;
+                       panel_click_distance_y = mousepos.y - panel_pos.y;
+                       panel_click_resizeorigin = panel_pos + eY * panel_size.y;
                        return;
                }
                // resize from bottomleft border
-               else if(mousepos_x >= panel_pos_x - border && mousepos_y >= panel_pos_y + 0.5 * panel_size_y && mousepos_x <= panel_pos_x + 0.5 * panel_size_x && mousepos_y <= panel_pos_y + panel_size_y + border)
+               else if(mousepos.x >= panel_pos.x - border && mousepos.y >= panel_pos.y + 0.5 * panel_size.y && mousepos.x <= panel_pos.x + 0.5 * panel_size.x && mousepos.y <= panel_pos.y + panel_size.y + border)
                {
                        highlightedPanel = hud_panel[i];
                        HUD_Panel_FirstInDrawQ(i);
                        highlightedAction = 2;
                        resizeCorner = 3;
-                       panel_click_distance_x = mousepos_x - panel_pos_x;
-                       panel_click_distance_y = panel_size_y - mousepos_y + panel_pos_y;
-                       panel_click_resizeorigin = panel_pos + eX * panel_size_x;
+                       panel_click_distance_x = mousepos.x - panel_pos.x;
+                       panel_click_distance_y = panel_size.y - mousepos.y + panel_pos.y;
+                       panel_click_resizeorigin = panel_pos + eX * panel_size.x;
                        return;
                }
                // resize from bottomright border
-               else if(mousepos_x >= panel_pos_x + 0.5 * panel_size_x && mousepos_y >= panel_pos_y + 0.5 * panel_size_y && mousepos_x <= panel_pos_x + panel_size_x + border && mousepos_y <= panel_pos_y + panel_size_y + border)
+               else if(mousepos.x >= panel_pos.x + 0.5 * panel_size.x && mousepos.y >= panel_pos.y + 0.5 * panel_size.y && mousepos.x <= panel_pos.x + panel_size.x + border && mousepos.y <= panel_pos.y + panel_size.y + border)
                {
                        highlightedPanel = hud_panel[i];
                        HUD_Panel_FirstInDrawQ(i);
@@ -1086,8 +1086,8 @@ void HUD_Panel_Mouse()
        {
                mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
 
-               mousepos_x = bound(0, mousepos_x, vid_conwidth);
-               mousepos_y = bound(0, mousepos_y, vid_conheight);
+               mousepos_x = bound(0, mousepos.x, vid_conwidth);
+               mousepos_y = bound(0, mousepos.y, vid_conheight);
        }
 
        if(mouseClicked)
@@ -1153,17 +1153,17 @@ void HUD_Panel_Mouse()
                {
                        vector mySize = '0 0 0';
                        if(resizeCorner == 1) {
-                               mySize_x = panel_click_resizeorigin_x - (mousepos_x - panel_click_distance_x);
-                               mySize_y = panel_click_resizeorigin_y - (mousepos_y - panel_click_distance_y);
+                               mySize_x = panel_click_resizeorigin.x - (mousepos.x - panel_click_distance.x);
+                               mySize_y = panel_click_resizeorigin.y - (mousepos.y - panel_click_distance.y);
                        } else if(resizeCorner == 2) {
-                               mySize_x = mousepos_x + panel_click_distance_x - panel_click_resizeorigin_x;
-                               mySize_y = panel_click_distance_y + panel_click_resizeorigin_y - mousepos_y;
+                               mySize_x = mousepos.x + panel_click_distance.x - panel_click_resizeorigin.x;
+                               mySize_y = panel_click_distance.y + panel_click_resizeorigin.y - mousepos.y;
                        } else if(resizeCorner == 3) {
-                               mySize_x = panel_click_resizeorigin_x + panel_click_distance_x - mousepos_x;
-                               mySize_y = mousepos_y + panel_click_distance_y - panel_click_resizeorigin_y;
+                               mySize_x = panel_click_resizeorigin.x + panel_click_distance.x - mousepos.x;
+                               mySize_y = mousepos.y + panel_click_distance.y - panel_click_resizeorigin.y;
                        } else { // resizeCorner == 4
-                               mySize_x = mousepos_x - (panel_click_resizeorigin_x - panel_click_distance_x);
-                               mySize_y = mousepos_y - (panel_click_resizeorigin_y - panel_click_distance_y);
+                               mySize_x = mousepos.x - (panel_click_resizeorigin.x - panel_click_distance.x);
+                               mySize_y = mousepos.y - (panel_click_resizeorigin.y - panel_click_distance.y);
                        }
                        HUD_Panel_SetPosSize(mySize);
                }
@@ -1199,17 +1199,17 @@ void HUD_Configure_DrawGrid()
        {
                hud_configure_gridSize_x = bound(0.005, cvar("hud_configure_grid_xsize"), 0.2);
                hud_configure_gridSize_y = bound(0.005, cvar("hud_configure_grid_ysize"), 0.2);
-               hud_configure_realGridSize_x = hud_configure_gridSize_x * vid_conwidth;
-               hud_configure_realGridSize_y = hud_configure_gridSize_y * vid_conheight;
+               hud_configure_realGridSize_x = hud_configure_gridSize.x * vid_conwidth;
+               hud_configure_realGridSize_y = hud_configure_gridSize.y * vid_conheight;
                vector s;
                // x-axis
                s = eX + eY * vid_conheight;
-               for(i = 1; i < 1/hud_configure_gridSize_x; ++i)
-                       drawfill(eX * i * hud_configure_realGridSize_x, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL);
+               for(i = 1; i < 1/hud_configure_gridSize.x; ++i)
+                       drawfill(eX * i * hud_configure_realGridSize.x, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL);
                // y-axis
                s = eY + eX * vid_conwidth;
-               for(i = 1; i < 1/hud_configure_gridSize_y; ++i)
-                       drawfill(eY * i * hud_configure_realGridSize_y, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL);
+               for(i = 1; i < 1/hud_configure_gridSize.y; ++i)
+                       drawfill(eY * i * hud_configure_realGridSize.y, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL);
        }
 }
 
@@ -1259,10 +1259,10 @@ const string hlBorder2 = "gfx/hud/default/border_highlighted2";
 void HUD_Panel_HlBorder(float myBorder, vector color, float theAlpha)
 {
        drawfill(panel_pos - '1 1 0' * myBorder, panel_size + '2 2 0' * myBorder, '0 0.5 1', .5 * theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder, hlBorder, '8 1 0' * hlBorderSize, eX * (panel_size_x + 2 * myBorder) + eY * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * (panel_size_y + 2 * myBorder - hlBorderSize), hlBorder, '8 1 0' * hlBorderSize, eX * (panel_size_x + 2 * myBorder) + eY * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * hlBorderSize, hlBorder2, '1 8 0' * hlBorderSize, eY * (panel_size_y + 2 * myBorder - 2 * hlBorderSize) + eX * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * hlBorderSize + eX * (panel_size_x + 2 * myBorder - hlBorderSize), hlBorder2, '1 8 0' * hlBorderSize, eY * (panel_size_y + 2 * myBorder - 2 * hlBorderSize) + eX * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(panel_pos - '1 1 0' * myBorder, hlBorder, '8 1 0' * hlBorderSize, eX * (panel_size.x + 2 * myBorder) + eY * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * (panel_size.y + 2 * myBorder - hlBorderSize), hlBorder, '8 1 0' * hlBorderSize, eX * (panel_size.x + 2 * myBorder) + eY * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * hlBorderSize, hlBorder2, '1 8 0' * hlBorderSize, eY * (panel_size.y + 2 * myBorder - 2 * hlBorderSize) + eX * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * hlBorderSize + eX * (panel_size.x + 2 * myBorder - hlBorderSize), hlBorder2, '1 8 0' * hlBorderSize, eY * (panel_size.y + 2 * myBorder - 2 * hlBorderSize) + eX * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
 }
 
 void HUD_Configure_PostDraw()
index dc1b825..8e4ede2 100644 (file)
@@ -67,8 +67,8 @@ vector MapVote_RGB(int id)
 void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float count, int id)
 {
        float alpha;
-       float desc_padding = gtv_text_size_x * 3;
-       float rect_margin = hud_fontsize_y / 2;
+       float desc_padding = gtv_text_size.x * 3;
+       float rect_margin = hud_fontsize.y / 2;
        vector rect_pos = pos - '0.5 0.5 0' * rect_margin;
        vector rect_size = '1 1 0';
        rect_size_x = tsize + rect_margin;
@@ -100,16 +100,16 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
                                                                                  count, tsize, gtv_text_size);
        title.origin = pos-offset;
        
-       pos_y += gtv_text_size_small_y;
-       pos_y += gtv_text_size_y/2;
+       pos.y += gtv_text_size_small.y;
+       pos.y += gtv_text_size.y/2;
        
-       maxh -= gtv_text_size_y;
+       maxh -= gtv_text_size.y;
        
        entity picent = spawn();
        picent.origin = pos-offset;
        picent.maxs = '1 1 0 ' * min(maxh, desc_padding) * 0.8;
        
-       pos_x += desc_padding;
+       pos.x += desc_padding;
        tsize -= desc_padding;
        
        string thelabel = GameTypeVote_DescriptionByID(id), ts;
@@ -118,10 +118,10 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
        if( thelabel != "") 
        {
                float i,n = tokenizebyseparator(thelabel, "\n");
-               for(i = 0; i < n && maxh > (nlines+1)*gtv_text_size_small_y; ++i)
+               for(i = 0; i < n && maxh > (nlines+1)*gtv_text_size_small.y; ++i)
                {
                        getWrappedLine_remaining = argv(i);
-                       while(getWrappedLine_remaining && maxh > (nlines+1)*gtv_text_size_small_y)
+                       while(getWrappedLine_remaining && maxh > (nlines+1)*gtv_text_size_small.y)
                        {
                                ts = getWrappedLine(tsize, gtv_text_size_small, stringwidth_colors);
                                if (ts != "")
@@ -131,16 +131,16 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
                                        next.origin = pos-offset;
                                        last.chain = next;
                                        last = next;
-                                       pos_y += gtv_text_size_small_y;
+                                       pos.y += gtv_text_size_small.y;
                                        nlines++;
                                }
                        }
                }
        }
        
-       maxh -= max(nlines*gtv_text_size_small_y,picent.maxs_y);
+       maxh -= max(nlines*gtv_text_size_small.y,picent.maxs.y);
        if ( maxh > 0 )
-               offset_y += maxh/2;
+               offset.y += maxh/2;
        drawstring(title.origin+offset, title.message, gtv_text_size, rgb, alpha, DRAWFLAG_NORMAL); 
        
        if(pic != "")
@@ -165,14 +165,14 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        string label;
        float text_size;
 
-       isize -= hud_fontsize_y; // respect the text when calculating the image size
+       isize -= hud_fontsize.y; // respect the text when calculating the image size
 
        rgb = MapVote_RGB(id);
 
        img_size_y = isize;
        img_size_x = isize / 0.75; // 4:3 x can be stretched easily, height is defined in isize
 
-       pos_y = pos_y + img_size_y;
+       pos_y = pos.y + img_size.y;
 
        label = MapVote_FormatMapItem(id, map, count, tsize, hud_fontsize);
 
@@ -184,11 +184,11 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        else
                theAlpha = 1;
 
-       pos_x -= text_size*0.5;
+       pos.x -= text_size*0.5;
        drawstring(pos, label, hud_fontsize, rgb, theAlpha, DRAWFLAG_NORMAL);
 
-       pos_x = pos_x + text_size*0.5 - img_size_x*0.5;
-       pos_y = pos_y - img_size_y;
+       pos_x = pos.x + text_size*0.5 - img_size.x*0.5;
+       pos_y = pos.y - img_size.y;
 
        pos += autocvar_scoreboard_border_thickness * '1 1 0';
        img_size -= (autocvar_scoreboard_border_thickness * 2) * '1 1 0';
@@ -221,13 +221,13 @@ void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, int
 
        rgb = MapVote_RGB(id);
 
-       pos_y = pos_y + hud_fontsize_y;
+       pos_y = pos.y + hud_fontsize.y;
 
        label = MapVote_FormatMapItem(id, _("Don't care"), count, tsize, hud_fontsize);
 
        text_size = stringwidth(label, false, hud_fontsize);
 
-       pos_x -= text_size*0.5;
+       pos.x -= text_size*0.5;
        drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL);
 }
 
@@ -235,9 +235,9 @@ vector MapVote_GridVec(vector gridspec, int i, int m)
 {
        int r = i % m;
        return
-               '1 0 0' * (gridspec_x * r)
+               '1 0 0' * (gridspec.x * r)
                +
-               '0 1 0' * (gridspec_y * (i - r) / m);
+               '0 1 0' * (gridspec.y * (i - r) / m);
 }
 
 float MapVote_Selection(vector topleft, vector cellsize, float rows, float columns)
@@ -250,10 +250,10 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum
        for (r = 0; r < rows; ++r)
                for (c = 0; c < columns; ++c)
                {
-                       if (mv_mousepos_x >= topleft_x + cellsize_x *  c &&
-                               mv_mousepos_x <= topleft_x + cellsize_x * (c + 1) &&
-                               mv_mousepos_y >= topleft_y + cellsize_y *  r &&
-                               mv_mousepos_y <= topleft_y + cellsize_y * (r + 1))
+                       if (mv_mousepos.x >= topleft.x + cellsize.x *  c &&
+                               mv_mousepos.x <= topleft.x + cellsize.x * (c + 1) &&
+                               mv_mousepos.y >= topleft.y + cellsize.y *  r &&
+                               mv_mousepos.y <= topleft.y + cellsize.y * (r + 1))
                        {
                                mv_mouse_selection = r * columns + c;
                                break;
@@ -290,10 +290,10 @@ void MapVote_Draw()
        if (!autocvar_hud_cursormode)
        {
                vector mpos = mv_mousepos + getmousepos();
-               mpos_x = bound(0, mpos_x, vid_conwidth);
-               mpos_y = bound(0, mpos_y, vid_conheight);
+               mpos_x = bound(0, mpos.x, vid_conwidth);
+               mpos_y = bound(0, mpos.y, vid_conheight);
                
-               if ( mpos_x != mv_mousepos_x || mpos_y != mv_mousepos_y )
+               if ( mpos.x != mv_mousepos.x || mpos.y != mv_mousepos.y )
                        mv_selection_keyboard = 0;
                mv_mousepos = mpos;
 
@@ -318,58 +318,58 @@ void MapVote_Draw()
        map = ((gametypevote) ? _("Decide the gametype") : _("Vote for a map"));
        pos_x = center - stringwidth(map, false, '12 0 0');
        drawstring(pos, map, '24 24 0', '1 1 1', 1, DRAWFLAG_NORMAL);
-       pos_y += 26;
+       pos.y += 26;
 
        if( mapvote_chosenmap != "" )
        {
                pos_x = center - stringwidth(mapvote_chosenmap, false, hud_fontsize*1.5/2);
                drawstring(pos, mapvote_chosenmap, hud_fontsize*1.5, '1 1 1', 1, DRAWFLAG_NORMAL);
-               pos_y += hud_fontsize_y*2;
+               pos.y += hud_fontsize.y*2;
        }
 
        i = ceil(max(0, mv_timeout - time));
        map = sprintf(_("%d seconds left"), i);
        pos_x = center - stringwidth(map, false, '8 0 0');
        drawstring(pos, map, '16 16 0', '0 1 0', 1, DRAWFLAG_NORMAL);
-       pos_y += 22;
+       pos.y += 22;
        pos_x = xmin;
        draw_endBoldFont();
 
        // base for multi-column stuff...
-       ymin = pos_y;
+       ymin = pos.y;
        if(mv_abstain)
                mv_num_maps -= 1;
 
        rows = ceil(mv_num_maps / mv_columns);
 
        dist_x = (xmax - xmin) / mv_columns;
-       dist_y = (ymax - pos_y) / rows;
+       dist_y = (ymax - pos.y) / rows;
 
        if ( gametypevote )
        {
-               tsize = dist_x - hud_fontsize_y;
-               isize = dist_y;
-               float maxheight = (ymax - pos_y) / 3;
+               tsize = dist.x - hud_fontsize.y;
+               isize = dist.y;
+               float maxheight = (ymax - pos.y) / 3;
                if ( isize > maxheight )
                {
-                       pos_x += (isize - maxheight)/2;
+                       pos.x += (isize - maxheight)/2;
                        isize = maxheight;
                }
                else
-                       dist_y += hud_fontsize_y;
-               pos_x = ( vid_conwidth - dist_x * mv_columns ) / 2;
+                       dist.y += hud_fontsize.y;
+               pos_x = ( vid_conwidth - dist.x * mv_columns ) / 2;
        }
        else
        {
-               tsize = dist_x - 10;
-               isize = min(dist_y - 10, 0.75 * tsize);
+               tsize = dist.x - 10;
+               isize = min(dist.y - 10, 0.75 * tsize);
        }
 
        mv_selection = MapVote_Selection(pos, dist, rows, mv_columns);
 
        if ( !gametypevote )
-               pos_x += dist_x / 2;
-       pos_y += (dist_y - isize) / 2;
+               pos.x += dist.x / 2;
+       pos.y += (dist.y - isize) / 2;
        ymax -= isize;
 
        if (mv_top2_time)
@@ -397,7 +397,7 @@ void MapVote_Draw()
 
        if(mv_abstain && i < mv_num_maps) {
                tmp = mv_votes[i];
-               pos_y = ymax + isize - hud_fontsize_y;
+               pos_y = ymax + isize - hud_fontsize.y;
                pos_x = (xmax+xmin)*0.5;
                MapVote_DrawAbstain(pos, isize, xmax - xmin, tmp, i);
        }
index ee0ba0c..41c64b8 100644 (file)
@@ -132,7 +132,7 @@ vector HUD_GetFontsize(string cvarname)
        if(v_x == 0)
                v = '8 8 0';
        if(v_y == 0)
-               v_y = v_x;
+               v_y = v.x;
        v_z = 0;
        return v;
 }
@@ -154,8 +154,8 @@ vector rotate(vector v, float a)
 {
        vector w = '0 0 0';
        // FTEQCC SUCKS AGAIN
-       w_x =      v_x * cos(a) + v_y * sin(a);
-       w_y = -1 * v_x * sin(a) + v_y * cos(a);
+       w_x =      v.x * cos(a) + v.y * sin(a);
+       w_y = -1 * v.x * sin(a) + v.y * cos(a);
        return w;
 }
 
@@ -197,8 +197,8 @@ vector project_3d_to_2d(vector vec)
        vec = cs_project(vec);
        if(cs_project_is_b0rked > 0)
        {
-               vec_x *= vid_conwidth / vid_width;
-               vec_y *= vid_conheight / vid_height;
+               vec.x *= vid_conwidth / vid_width;
+               vec.y *= vid_conheight / vid_height;
        }
        return vec;
 }
@@ -214,7 +214,7 @@ float expandingbox_sizefactor_from_fadelerp(float fadelerp)
 
 vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor)
 {
-       boxsize_x *= boxxsizefactor; // easier interface for text
+       boxsize.x *= boxxsizefactor; // easier interface for text
        return boxsize * (0.5 * (1 - sz));
 }
 
@@ -223,18 +223,18 @@ void drawborderlines(float thickness, vector pos, vector dim, vector color, floa
        vector line_dim = '0 0 0';
 
        // left and right lines
-       pos_x -= thickness;
+       pos.x -= thickness;
        line_dim_x = thickness;
-       line_dim_y = dim_y;
+       line_dim_y = dim.y;
        drawfill(pos, line_dim, color, theAlpha, drawflag);
-       drawfill(pos + (dim_x + thickness) * '1 0 0', line_dim, color, theAlpha, drawflag);
+       drawfill(pos + (dim.x + thickness) * '1 0 0', line_dim, color, theAlpha, drawflag);
 
        // upper and lower lines
-       pos_y -= thickness;
-       line_dim_x = dim_x + thickness * 2; // make upper and lower lines longer
+       pos.y -= thickness;
+       line_dim_x = dim.x + thickness * 2; // make upper and lower lines longer
        line_dim_y = thickness;
        drawfill(pos, line_dim, color, theAlpha, drawflag);
-       drawfill(pos + (dim_y + thickness) * '0 1 0', line_dim, color, theAlpha, drawflag);
+       drawfill(pos + (dim.y + thickness) * '0 1 0', line_dim, color, theAlpha, drawflag);
 }
 
 void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag)
@@ -242,20 +242,20 @@ void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color,
        vector current_pos = '0 0 0', end_pos, new_size = '0 0 0', ratio = '0 0 0';
        end_pos = pos + area;
 
-       current_pos_y = pos_y;
-       while (current_pos_y < end_pos_y)
+       current_pos_y = pos.y;
+       while (current_pos.y < end_pos.y)
        {
-               current_pos_x = pos_x;
-               while (current_pos_x < end_pos_x)
+               current_pos_x = pos.x;
+               while (current_pos.x < end_pos.x)
                {
-                       new_size_x = min(sz_x, end_pos_x - current_pos_x);
-                       new_size_y = min(sz_y, end_pos_y - current_pos_y);
-                       ratio_x = new_size_x / sz_x;
-                       ratio_y = new_size_y / sz_y;
+                       new_size_x = min(sz.x, end_pos.x - current_pos.x);
+                       new_size_y = min(sz.y, end_pos.y - current_pos.y);
+                       ratio_x = new_size.x / sz.x;
+                       ratio_y = new_size.y / sz.y;
                        drawsubpic(current_pos, new_size, pic, '0 0 0', ratio, color, theAlpha, drawflag);
-                       current_pos_x += sz_x;
+                       current_pos.x += sz.x;
                }
-               current_pos_y += sz_y;
+               current_pos.y += sz.y;
        }
 }
 
@@ -269,18 +269,18 @@ var string _drawpic_picpath;
        do {\
                _drawpic_imgsize = draw_getimagesize(pic);\
                if(_drawpic_imgsize != '0 0 0') {\
-                       _drawpic_imgaspect = _drawpic_imgsize_x/_drawpic_imgsize_y;\
+                       _drawpic_imgaspect = _drawpic_imgsize.x/_drawpic_imgsize.y;\
                        _drawpic_sz = mySize;\
-                       if(_drawpic_sz_x/_drawpic_sz_y > _drawpic_imgaspect) {\
-                               _drawpic_oldsz = _drawpic_sz_x;\
-                               _drawpic_sz_x = _drawpic_sz_y * _drawpic_imgaspect;\
-                               if(_drawpic_sz_x)\
-                                       drawpic(pos + eX * (_drawpic_oldsz - _drawpic_sz_x) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
+                       if(_drawpic_sz.x/_drawpic_sz.y > _drawpic_imgaspect) {\
+                               _drawpic_oldsz = _drawpic_sz.x;\
+                               _drawpic_sz_x = _drawpic_sz.y * _drawpic_imgaspect;\
+                               if(_drawpic_sz.x)\
+                                       drawpic(pos + eX * (_drawpic_oldsz - _drawpic_sz.x) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
                        } else {\
-                               _drawpic_oldsz = _drawpic_sz_y;\
-                               _drawpic_sz_y = _drawpic_sz_x / _drawpic_imgaspect;\
-                               if(_drawpic_sz_y)\
-                                       drawpic(pos + eY * (_drawpic_oldsz - _drawpic_sz_y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
+                               _drawpic_oldsz = _drawpic_sz.y;\
+                               _drawpic_sz_y = _drawpic_sz.x / _drawpic_imgaspect;\
+                               if(_drawpic_sz.y)\
+                                       drawpic(pos + eY * (_drawpic_oldsz - _drawpic_sz.y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
                        }\
                }\
        } while(0)
@@ -322,27 +322,27 @@ void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theSc
 }
 #define SET_POS_AND_SZ_Y_ASPECT(allow_colors)\
        float textaspect, oldsz;\
-       textaspect = stringwidth(text, allow_colors, '1 1 1' * sz_y) / sz_y;\
-       if(sz_x/sz_y > textaspect) {\
-               oldsz = sz_x;\
-               sz_x = sz_y * textaspect;\
-               pos_x += (oldsz - sz_x) * 0.5;\
+       textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y;\
+       if(sz.x/sz.y > textaspect) {\
+               oldsz = sz.x;\
+               sz_x = sz.y * textaspect;\
+               pos.x += (oldsz - sz.x) * 0.5;\
        } else {\
-               oldsz = sz_y;\
-               sz_y = sz_x / textaspect; \
-               pos_y += (oldsz - sz_y) * 0.5;\
+               oldsz = sz.y;\
+               sz_y = sz.x / textaspect; \
+               pos.y += (oldsz - sz.y) * 0.5;\
        }
 
 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
 void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag) {
        SET_POS_AND_SZ_Y_ASPECT(FALSE)
-       drawstring(pos, text, '1 1 0' * sz_y, color, theAlpha, drawflag);
+       drawstring(pos, text, '1 1 0' * sz.y, color, theAlpha, drawflag);
 }
 
 // drawstring wrapper to draw a colorcodedstring as large as possible with preserved aspect ratio into a box
 void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAlpha, float drawflag) {
        SET_POS_AND_SZ_Y_ASPECT(TRUE)
-       drawcolorcodedstring(pos, text, '1 1 0' * sz_y, theAlpha, drawflag);
+       drawcolorcodedstring(pos, text, '1 1 0' * sz.y, theAlpha, drawflag);
 }
 
 vector drawfontscale;
@@ -353,7 +353,7 @@ void drawstring_expanding(vector position, string text, vector theScale, vector
 
        drawfontscale = sz * '1 1 0';
        dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
-       drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, FALSE, theScale * (sz / drawfontscale_x)) / (theScale_x * sz)), text, theScale * (sz / drawfontscale_x), rgb, theAlpha * (1 - fadelerp), flag);
+       drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, FALSE, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), rgb, theAlpha * (1 - fadelerp), flag);
        // width parameter:
        //    (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
        //    SIZE1
@@ -363,7 +363,7 @@ void drawstring_expanding(vector position, string text, vector theScale, vector
 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
 void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag, float fadelerp) {
        SET_POS_AND_SZ_Y_ASPECT(FALSE)
-       drawstring_expanding(pos, text, '1 1 0' * sz_y, color, theAlpha, drawflag, fadelerp);
+       drawstring_expanding(pos, text, '1 1 0' * sz.y, color, theAlpha, drawflag, fadelerp);
 }
 
 void drawcolorcodedstring_expanding(vector position, string text, vector theScale, float theAlpha, float flag, float fadelerp)
@@ -373,13 +373,13 @@ void drawcolorcodedstring_expanding(vector position, string text, vector theScal
 
        drawfontscale = sz * '1 1 0';
        dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
-       drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, TRUE, theScale * (sz / drawfontscale_x)) / (theScale_x * sz)), text, theScale * (sz / drawfontscale_x), theAlpha * (1 - fadelerp), flag);
+       drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, TRUE, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), theAlpha * (1 - fadelerp), flag);
        drawfontscale = '1 1 0';
 }
 
 void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float theAlpha, float drawflag, float fadelerp) {
        SET_POS_AND_SZ_Y_ASPECT(TRUE)
-       drawcolorcodedstring_expanding(pos, text, '1 1 0' * sz_y, theAlpha, drawflag, fadelerp);
+       drawcolorcodedstring_expanding(pos, text, '1 1 0' * sz.y, theAlpha, drawflag, fadelerp);
 }
 
 // this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
@@ -397,9 +397,9 @@ float PolyDrawModelSurface(entity e, float i_s)
        {
                tri = getsurfacetriangle(e, i_s, i_t);
                R_BeginPolygon(tex, 0);
-               R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1);
-               R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1);
-               R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1);
+               R_PolygonVertex(getsurfacepoint(e, i_s, tri.x), getsurfacepointattribute(e, i_s, tri.x, SPA_TEXCOORDS0), '1 1 1', 1);
+               R_PolygonVertex(getsurfacepoint(e, i_s, tri.y), getsurfacepointattribute(e, i_s, tri.y, SPA_TEXCOORDS0), '1 1 1', 1);
+               R_PolygonVertex(getsurfacepoint(e, i_s, tri.z), getsurfacepointattribute(e, i_s, tri.z, SPA_TEXCOORDS0), '1 1 1', 1);
                R_EndPolygon();
        }
        return 1;
@@ -429,19 +429,19 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                // draw full rectangle
                R_BeginPolygon(pic, drawflag);
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x += 0.5 * ringsize_x;        t += '0.5 0.5 0';
+                       v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_y += 0.5 * ringsize_y;        t += '0.5 -0.5 0';
+                       v.y += 0.5 * ringsize.y;        t += '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x -= 0.5 * ringsize_x;        t -= '0.5 0.5 0';
+                       v.x -= 0.5 * ringsize.x;        t -= '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_y -= 0.5 * ringsize_y;        t -= '0.5 -0.5 0';
+                       v.y -= 0.5 * ringsize.y;        t -= '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
                R_EndPolygon();
 
@@ -453,7 +453,7 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                                R_PolygonVertex(v, t, rgb, a);
 
                                v = centre;                     t = '0.5 0.5 0';
-                               v_x += 0.5 * ringsize_x;        t += '0.5 0.5 0';
+                               v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                                R_PolygonVertex(v, t, rgb, a);
                }
        }
@@ -462,15 +462,15 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                // draw upper and first triangle
                R_BeginPolygon(pic, drawflag);
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x += 0.5 * ringsize_x;        t += '0.5 0.5 0';
+                       v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_y += 0.5 * ringsize_y;        t += '0.5 -0.5 0';
+                       v.y += 0.5 * ringsize.y;        t += '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x -= 0.5 * ringsize_x;        t -= '0.5 0.5 0';
+                       v.x -= 0.5 * ringsize.x;        t -= '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
                R_EndPolygon();
                R_BeginPolygon(pic, drawflag);
@@ -478,11 +478,11 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x -= 0.5 * ringsize_x;        t -= '0.5 0.5 0';
+                       v.x -= 0.5 * ringsize.x;        t -= '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_y -= 0.5 * ringsize_y;        t -= '0.5 -0.5 0';
+                       v.y -= 0.5 * ringsize.y;        t -= '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                d = q - 0.75;
@@ -494,15 +494,15 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                // draw upper triangle
                R_BeginPolygon(pic, drawflag);
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x += 0.5 * ringsize_x;        t += '0.5 0.5 0';
+                       v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_y += 0.5 * ringsize_y;        t += '0.5 -0.5 0';
+                       v.y += 0.5 * ringsize.y;        t += '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x -= 0.5 * ringsize_x;        t -= '0.5 0.5 0';
+                       v.x -= 0.5 * ringsize.x;        t -= '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
                R_EndPolygon();
 
@@ -514,7 +514,7 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                                R_PolygonVertex(v, t, rgb, a);
 
                                v = centre;                     t = '0.5 0.5 0';
-                               v_x -= 0.5 * ringsize_x;        t -= '0.5 0.5 0';
+                               v.x -= 0.5 * ringsize.x;        t -= '0.5 0.5 0';
                                R_PolygonVertex(v, t, rgb, a);
                }
        }
@@ -526,11 +526,11 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x += 0.5 * ringsize_x;        t += '0.5 0.5 0';
+                       v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                        v = centre;                     t = '0.5 0.5 0';
-                       v_y += 0.5 * ringsize_y;        t += '0.5 -0.5 0';
+                       v.y += 0.5 * ringsize.y;        t += '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
                d = q - 0.25;
@@ -547,7 +547,7 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
                                R_PolygonVertex(v, t, rgb, a);
 
                                v = centre;                     t = '0.5 0.5 0';
-                               v_x += 0.5 * ringsize_x;        t += '0.5 0.5 0';
+                               v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                                R_PolygonVertex(v, t, rgb, a);
                }
        }
@@ -555,8 +555,8 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
        if(d > 0)
        {
                        v = centre;                     t = '0.5 0.5 0';
-                       v_x += x * 0.5 * ringsize_x;    t += x * '0.5 0.5 0';
-                       v_y += y * 0.5 * ringsize_y;    t += y * '0.5 -0.5 0';
+                       v.x += x * 0.5 * ringsize.x;    t += x * '0.5 0.5 0';
+                       v.y += y * 0.5 * ringsize.y;    t += y * '0.5 -0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
                R_EndPolygon();
        }
index a5ffdab..e08c724 100644 (file)
@@ -16,7 +16,7 @@ float _Movetype_CheckWater(entity ent) // SV_CheckWater
        vector point;
 
        point = ent.move_origin;
-       point_z += (ent.mins_z + 1);
+       point_z += (ent.mins.z + 1);
 
        nativecontents = pointcontents(point);
 
@@ -36,11 +36,11 @@ float _Movetype_CheckWater(entity ent) // SV_CheckWater
        {
                ent.move_watertype = nativecontents;
                ent.move_waterlevel = 1;
-               point_y = (ent.origin_y + ((ent.mins_z + ent.maxs_y) * 0.5));
+               point_y = (ent.origin.y + ((ent.mins.z + ent.maxs.y) * 0.5));
                if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(point)) & DPCONTENTS_LIQUIDSMASK)
                {
                        ent.move_waterlevel = 2;
-                       point_y = ent.origin_y + ent.view_ofs_y;
+                       point_y = ent.origin.y + ent.view_ofs.y;
                        if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(point)) & DPCONTENTS_LIQUIDSMASK)
                                ent.move_waterlevel = 3;
                }
@@ -162,21 +162,21 @@ void _Movetype_LinkEdict(float touch_triggers) // SV_LinkEdict
 
        if(self.move_flags & FL_ITEM)
        {
-               mi_x -= 15;
-               mi_y -= 15;
-               mi_z -= 1;
-               ma_x += 15;
-               ma_y += 15;
-               ma_z += 1;
+               mi.x -= 15;
+               mi.y -= 15;
+               mi.z -= 1;
+               ma.x += 15;
+               ma.y += 15;
+               ma.z += 1;
        }
        else
        {
-               mi_x -= 1;
-               mi_y -= 1;
-               mi_z -= 1;
-               ma_x += 1;
-               ma_y += 1;
-               ma_z += 1;
+               mi.x -= 1;
+               mi.y -= 1;
+               mi.z -= 1;
+               ma.x += 1;
+               ma.y += 1;
+               ma.z += 1;
        }
 
        self.absmin = mi;
@@ -235,9 +235,9 @@ vector _Movetype_ClipVelocity(vector vel, vector norm, float f) // SV_ClipVeloci
 {
        vel = vel - ((vel * norm) * norm) * f;
 
-       if(vel_x > -0.1 && vel_x < 0.1) vel_x = 0;
-       if(vel_y > -0.1 && vel_y < 0.1) vel_y = 0;
-       if(vel_z > -0.1 && vel_z < 0.1) vel_z = 0;
+       if(vel.x > -0.1 && vel.x < 0.1) vel_x = 0;
+       if(vel.y > -0.1 && vel.y < 0.1) vel_y = 0;
+       if(vel.z > -0.1 && vel.z < 0.1) vel_z = 0;
 
        return vel;
 }
@@ -282,7 +282,7 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss
 {
        if(self.move_flags & FL_ONGROUND)
        {
-               if(self.move_velocity_z >= 1/32)
+               if(self.move_velocity.z >= 1/32)
                        self.move_flags &= ~FL_ONGROUND;
                else if(!self.move_groundentity)
                        return;
@@ -360,7 +360,7 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss
                        self.move_velocity = _Movetype_ClipVelocity(self.move_velocity, trace_plane_normal, 1 + bouncefac);
 
                        d = trace_plane_normal * self.move_velocity;
-                       if(trace_plane_normal_z > 0.7 && d < bouncestop && d > -bouncestop)
+                       if(trace_plane_normal.z > 0.7 && d < bouncestop && d > -bouncestop)
                        {
                                self.move_flags |= FL_ONGROUND;
                                self.move_groundentity = trace_ent;
@@ -373,7 +373,7 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss
                else
                {
                        self.move_velocity = _Movetype_ClipVelocity(self.move_velocity, trace_plane_normal, 1.0);
-                       if(trace_plane_normal_z > 0.7)
+                       if(trace_plane_normal.z > 0.7)
                        {
                                self.move_flags |= FL_ONGROUND;
                                self.move_groundentity = trace_ent;
index 5fcc3c1..578e961 100644 (file)
@@ -40,9 +40,9 @@ void Draw_PointParticles()
        for(i = random(); i <= n && fail <= 64*n; ++i)
        {
                p = o + self.mins;
-               p_x += random() * sz_x;
-               p_y += random() * sz_y;
-               p_z += random() * sz_z;
+               p.x += random() * sz.x;
+               p.y += random() * sz.y;
+               p.z += random() * sz.z;
                if(WarpZoneLib_BoxTouchesBrush(p, p, self, world))
                {
                        if(self.movedir != '0 0 0')
@@ -174,7 +174,7 @@ void Ent_PointParticles()
                if(!self.absolute)
                {
                        v = self.maxs - self.mins;
-                       self.impulse *= -v_x * v_y * v_z / 262144; // relative: particles per 64^3 cube
+                       self.impulse *= -v.x * v.y * v.z / 262144; // relative: particles per 64^3 cube
                }
        }
 
index bec9c9e..a0d7505 100644 (file)
@@ -172,7 +172,7 @@ void skeleton_from_frames(entity e, float is_dead)
                {
                        if(e.(bone_aim[i]))
                        {
-                               vector aim = '1 0 0' * bound(-90, self.v_angle_x, 90) * e.(bone_aimweight[i]);
+                               vector aim = '1 0 0' * bound(-90, self.v_angle.x, 90) * e.(bone_aimweight[i]);
                                vector org = skel_get_boneabs(s, e.(bone_aim[i]));
                                vector ang_cur = fixedvectoangles2(v_forward, v_up);
                                vector ang = AnglesTransform_Multiply(aim, ang_cur);
index e9b4ea0..69bdd01 100644 (file)
@@ -622,7 +622,7 @@ string HUD_FixScoreboardColumnWidth(int i, string str)
        if(hud_field_icon0 != "")
        {
                sz = draw_getimagesize(hud_field_icon0);
-               f = sz_x / sz_y;
+               f = sz.x / sz.y;
                if(hud_fixscoreboardcolumnwidth_iconlen < f)
                        hud_fixscoreboardcolumnwidth_iconlen = f;
        }
@@ -630,7 +630,7 @@ string HUD_FixScoreboardColumnWidth(int i, string str)
        if(hud_field_icon1 != "")
        {
                sz = draw_getimagesize(hud_field_icon1);
-               f = sz_x / sz_y;
+               f = sz.x / sz.y;
                if(hud_fixscoreboardcolumnwidth_iconlen < f)
                        hud_fixscoreboardcolumnwidth_iconlen = f;
        }
@@ -638,12 +638,12 @@ string HUD_FixScoreboardColumnWidth(int i, string str)
        if(hud_field_icon2 != "")
        {
                sz = draw_getimagesize(hud_field_icon2);
-               f = sz_x / sz_y;
+               f = sz.x / sz.y;
                if(hud_fixscoreboardcolumnwidth_iconlen < f)
                        hud_fixscoreboardcolumnwidth_iconlen = f;
        }
 
-       hud_fixscoreboardcolumnwidth_iconlen *= hud_fontsize_y / hud_fontsize_x; // fix icon aspect
+       hud_fixscoreboardcolumnwidth_iconlen *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect
 
        if(hud_fixscoreboardcolumnwidth_iconlen != 0)
                hud_fixscoreboardcolumnwidth_marginlen = stringwidth(" ", FALSE, hud_fontsize);
@@ -658,8 +658,8 @@ string HUD_FixScoreboardColumnWidth(int i, string str)
                for(j = 0; j < hud_num_fields; ++j)
                        if(j != i)
                                if (hud_field[i] != SP_SEPARATOR)
-                                       namesize -= hud_size[j] + hud_fontsize_x;
-               namesize += hud_fontsize_x;
+                                       namesize -= hud_size[j] + hud_fontsize.x;
+               namesize += hud_fontsize.x;
                hud_size[i] = namesize;
 
                if (hud_fixscoreboardcolumnwidth_iconlen != 0)
@@ -699,7 +699,7 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
        else if((scoreboard_highlight) && (!(pl_number % 2)))
                drawfill(h_pos, h_size, rgb, scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
 
-       tmp_x = item_size_x;
+       tmp_x = item_size.x;
        tmp_y = 0;
        tmp_z = 0;
        int i;
@@ -710,44 +710,44 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
                        break;
 
                if(is_spec && field != SP_NAME && field != SP_PING) {
-                       pos_x += hud_size[i] + hud_fontsize_x;
+                       pos.x += hud_size[i] + hud_fontsize.x;
                        continue;
                }
                str = HUD_GetField(pl, field);
                str = HUD_FixScoreboardColumnWidth(i, str);
 
-               pos_x += hud_size[i] + hud_fontsize_x;
+               pos.x += hud_size[i] + hud_fontsize.x;
 
                if(field == SP_NAME) {
-                       tmp_x = hud_size[i] - hud_fontsize_x*hud_fixscoreboardcolumnwidth_iconlen - hud_fixscoreboardcolumnwidth_marginlen + hud_fontsize_x;
+                       tmp_x = hud_size[i] - hud_fontsize.x*hud_fixscoreboardcolumnwidth_iconlen - hud_fixscoreboardcolumnwidth_marginlen + hud_fontsize.x;
                        if (is_self)
                                drawcolorcodedstring(pos - tmp, str, hud_fontsize, scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                        else
                                drawcolorcodedstring(pos - tmp, str, hud_fontsize, scoreboard_alpha_name, DRAWFLAG_NORMAL);
                } else {
-                       tmp_x = hud_fixscoreboardcolumnwidth_len + hud_fontsize_x;
+                       tmp_x = hud_fixscoreboardcolumnwidth_len + hud_fontsize.x;
                        if (is_self)
                                drawstring(pos - tmp, str, hud_fontsize, hud_field_rgb, scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                        else
                                drawstring(pos - tmp, str, hud_fontsize, hud_field_rgb, scoreboard_alpha_name, DRAWFLAG_NORMAL);
                }
 
-               tmp_x = hud_size[i] + hud_fontsize_x;
+               tmp_x = hud_size[i] + hud_fontsize.x;
                if(hud_field_icon0 != "")
                        if (is_self)
-                               drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                        else
-                               drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
                if(hud_field_icon1 != "")
                        if (is_self)
-                               drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                        else
-                               drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
                if(hud_field_icon2 != "")
                        if (is_self)
-                               drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                        else
-                               drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
        }
 
        if(hud_field[i] == SP_SEPARATOR)
@@ -760,7 +760,7 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
                                break;
 
                        if(is_spec && field != SP_NAME && field != SP_PING) {
-                               pos_x -= hud_size[i] + hud_fontsize_x;
+                               pos.x -= hud_size[i] + hud_fontsize.x;
                                continue;
                        }
 
@@ -784,20 +784,20 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
                        tmp_x = hud_size[i];
                        if(hud_field_icon0 != "")
                                if (is_self)
-                                       drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
+                                       drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                                else
-                                       drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
+                                       drawpic(pos - tmp, hud_field_icon0, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon0_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
                        if(hud_field_icon1 != "")
                                if (is_self)
-                                       drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
+                                       drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                                else
-                                       drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
+                                       drawpic(pos - tmp, hud_field_icon1, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon1_rgb, hud_field_icon1_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
                        if(hud_field_icon2 != "")
                                if (is_self)
-                                       drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
+                                       drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name_self, DRAWFLAG_NORMAL);
                                else
-                                       drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize_y + '1 0 0' * hud_fontsize_x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
-                       pos_x -= hud_size[i] + hud_fontsize_x;
+                                       drawpic(pos - tmp, hud_field_icon2, '0 1 0' * hud_fontsize.y + '1 0 0' * hud_fontsize.x * hud_fixscoreboardcolumnwidth_iconlen, hud_field_icon2_rgb, hud_field_icon2_alpha * scoreboard_alpha_name, DRAWFLAG_NORMAL);
+                       pos.x -= hud_size[i] + hud_fontsize.x;
                }
        }
 
@@ -817,13 +817,13 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        vector tmp = '0 0 0', column_dim = '0 0 0';
        entity pl;
 
-       body_table_height = 1.25 * hud_fontsize_y * max(1, tm.team_size); // no player? show 1 empty line
+       body_table_height = 1.25 * hud_fontsize.y * max(1, tm.team_size); // no player? show 1 empty line
 
-       pos_y += autocvar_scoreboard_border_thickness;
+       pos.y += autocvar_scoreboard_border_thickness;
        pos -= '1 1 0';
 
        tmp_x = sbwidth + 2;
-       tmp_y = 1.25 * hud_fontsize_y;
+       tmp_y = 1.25 * hud_fontsize.y;
 
        // rounded header
        if (teamplay)
@@ -832,16 +832,16 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, rgb + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
        // table border
-       tmp_y += autocvar_scoreboard_border_thickness;
-       tmp_y += body_table_height;
+       tmp.y += autocvar_scoreboard_border_thickness;
+       tmp.y += body_table_height;
        drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL); // more transparency for the scoreboard
 
        // separator header/table
-       pos_y += 1.25 * hud_fontsize_y;
+       pos.y += 1.25 * hud_fontsize.y;
        tmp_y = autocvar_scoreboard_border_thickness;
        drawfill(pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
-       pos_y += autocvar_scoreboard_border_thickness;
+       pos.y += autocvar_scoreboard_border_thickness;
 
        // table background
        tmp_y = body_table_height;
@@ -854,16 +854,16 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        //drawfill(pos, tmp + '2 0 0', rgb, 0.1, DRAWFLAG_NORMAL);
 
        // go back to the top to make alternated columns highlighting and to print the strings
-       pos_y -= 1.25 * hud_fontsize_y;
-       pos_y -= autocvar_scoreboard_border_thickness;
+       pos.y -= 1.25 * hud_fontsize.y;
+       pos.y -= autocvar_scoreboard_border_thickness;
 
        pos += '1 1 0';
 
        if (scoreboard_highlight)
        {
-               column_dim_y = 1.25 * hud_fontsize_y; // header
-               column_dim_y += autocvar_scoreboard_border_thickness;
-               column_dim_y += body_table_height;
+               column_dim_y = 1.25 * hud_fontsize.y; // header
+               column_dim.y += autocvar_scoreboard_border_thickness;
+               column_dim.y += body_table_height;
        }
 
        // print the strings of the columns headers and draw the columns
@@ -872,14 +872,14 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        {
                if(hud_field[i] == SP_SEPARATOR)
                        break;
-               column_dim_x = hud_size[i] + hud_fontsize_x;
+               column_dim_x = hud_size[i] + hud_fontsize.x;
                if (scoreboard_highlight)
                {
                        if (i % 2)
-                               drawfill(pos - '0 1 0' - hud_fontsize_x / 2 * '1 0 0', column_dim, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
+                               drawfill(pos - '0 1 0' - hud_fontsize.x / 2 * '1 0 0', column_dim, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
                }
                drawstring(pos, hud_title[i], hud_fontsize, rgb * 1.5, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-               pos_x += column_dim_x;
+               pos.x += column_dim.x;
        }
        if(hud_field[i] == SP_SEPARATOR)
        {
@@ -890,35 +890,35 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                        if(hud_field[i] == SP_SEPARATOR)
                                break;
 
-                       pos_x -= hud_size[i];
+                       pos.x -= hud_size[i];
 
                        if (scoreboard_highlight)
                        {
                                if (!(i % 2))
                                {
                                        if (i == hud_num_fields-1)
-                                               column_dim_x = hud_size[i] + hud_fontsize_x / 2 + 1;
+                                               column_dim_x = hud_size[i] + hud_fontsize.x / 2 + 1;
                                        else
-                                               column_dim_x = hud_size[i] + hud_fontsize_x;
-                                       drawfill(pos - '0 1 0' - hud_fontsize_x / 2 * '1 0 0', column_dim, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
+                                               column_dim_x = hud_size[i] + hud_fontsize.x;
+                                       drawfill(pos - '0 1 0' - hud_fontsize.x / 2 * '1 0 0', column_dim, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
                                }
                        }
 
                        tmp_x = stringwidth(hud_title[i], FALSE, hud_fontsize);
-                       tmp_x = (hud_size[i] - tmp_x);
+                       tmp_x = (hud_size[i] - tmp.x);
                        drawstring(pos + tmp, hud_title[i], hud_fontsize, rgb * 1.5, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-                       pos_x -= hud_fontsize_x;
+                       pos.x -= hud_fontsize.x;
                }
        }
        draw_endBoldFont();
 
        pos_x = xmin;
-       pos_y += 1.25 * hud_fontsize_y; // skip the header
-       pos_y += autocvar_scoreboard_border_thickness;
+       pos.y += 1.25 * hud_fontsize.y; // skip the header
+       pos.y += autocvar_scoreboard_border_thickness;
 
        // item size
        tmp_x = sbwidth;
-       tmp_y = hud_fontsize_y * 1.25;
+       tmp_y = hud_fontsize.y * 1.25;
 
        // fill the table and draw the rows
        i = 0;
@@ -928,7 +928,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                        if(pl.team != tm.team)
                                continue;
                        HUD_PrintScoreboardItem(pos, tmp, pl, (pl.sv_entnum == player_localnum), i);
-                       pos_y += 1.25 * hud_fontsize_y;
+                       pos.y += 1.25 * hud_fontsize.y;
                        ++i;
                }
        else
@@ -937,13 +937,13 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                        if(pl.team == NUM_SPECTATOR)
                                continue;
                        HUD_PrintScoreboardItem(pos, tmp, pl, (pl.sv_entnum == player_localnum), i);
-                       pos_y += 1.25 * hud_fontsize_y;
+                       pos.y += 1.25 * hud_fontsize.y;
                        ++i;
                }
 
        if (i == 0)
-               pos_y += 1.25 * hud_fontsize_y; // move to the end of the table
-       pos_y += 1.25 * hud_fontsize_y; // move empty row (out of the table)
+               pos.y += 1.25 * hud_fontsize.y; // move to the end of the table
+       pos.y += 1.25 * hud_fontsize.y; // move empty row (out of the table)
 
        return pos;
 }
@@ -981,7 +981,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        float g_instagib = 0;
 
        drawstring(pos, sprintf(_("Accuracy stats (average %d%%)"), average_accuracy), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       pos_y += 1.25 * hud_fontsize_y + autocvar_scoreboard_border_thickness;
+       pos.y += 1.25 * hud_fontsize.y + autocvar_scoreboard_border_thickness;
        vector tmp = '0 0 0';
        tmp_x = sbwidth;
        tmp_y = height * rows;
@@ -1009,7 +1009,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        float weapons_with_stats;
        weapons_with_stats = 0;
        if(rows == 2)
-               pos_x += weapon_width / 2;
+               pos.x += weapon_width / 2;
 
        if(switchweapon == WEP_VAPORIZER)
                g_instagib = 1; // TODO: real detection for instagib?
@@ -1053,10 +1053,10 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 
                        drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
                }
-               pos_x += weapon_width * rows;
+               pos.x += weapon_width * rows;
                if(rows == 2 && i == 6) {
-                       pos_x -= sbwidth;
-                       pos_y += height;
+                       pos.x -= sbwidth;
+                       pos.y += height;
                }
        }
 
@@ -1064,22 +1064,22 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                average_accuracy = floor((average_accuracy * 100 / weapons_with_stats) + 0.5);
 
        if(rows == 2)
-               pos_x -= weapon_width / 2;
-       pos_x -= sbwidth;
-       pos_y += height;
+               pos.x -= weapon_width / 2;
+       pos.x -= sbwidth;
+       pos.y += height;
 
-       pos_y +=  1.25 * hud_fontsize_y;
+       pos.y +=  1.25 * hud_fontsize.y;
        return pos;
 }
 
 vector HUD_DrawKeyValue(vector pos, string key, string value) {
-       float px = pos_x;
-       pos_x += hud_fontsize_x * 0.25;
+       float px = pos.x;
+       pos.x += hud_fontsize.x * 0.25;
        drawstring(pos, key, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       pos_x = xmax - stringwidth(value, FALSE, hud_fontsize) - hud_fontsize_x * 0.25;
+       pos_x = xmax - stringwidth(value, FALSE, hud_fontsize) - hud_fontsize.x * 0.25;
        drawstring(pos, value, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_x = px;
-       pos_y+= hud_fontsize_y;
+       pos.y+= hud_fontsize.y;
 
        return pos;
 }
@@ -1110,12 +1110,12 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
 
        //  draw table header
        drawstring(pos, _("Map stats:"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       pos_y += 1.25 * hud_fontsize_y + autocvar_scoreboard_border_thickness;
+       pos.y += 1.25 * hud_fontsize.y + autocvar_scoreboard_border_thickness;
 
        // draw table
        vector tmp = '0 0 0';
        tmp_x = sbwidth;
-       tmp_y = hud_fontsize_y * rows;
+       tmp_y = hud_fontsize.y * rows;
 
        if (teamplay)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
@@ -1138,7 +1138,7 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
        }
 
        // update position
-       pos_y += 1.25 * hud_fontsize_y;
+       pos.y += 1.25 * hud_fontsize.y;
        return pos;
 }
 
@@ -1161,12 +1161,12 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
        hl_rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
        hl_rgb_z = autocvar_scoreboard_color_bg_b + 0.5;
 
-       pos_y += hud_fontsize_y;
+       pos.y += hud_fontsize.y;
        drawstring(pos, _("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       pos_y += hud_fontsize_y + autocvar_scoreboard_border_thickness;
+       pos.y += hud_fontsize.y + autocvar_scoreboard_border_thickness;
        vector tmp = '0 0 0';
        tmp_x = sbwidth;
-       tmp_y = 1.25 * hud_fontsize_y * RANKINGS_RECEIVED_CNT;
+       tmp_y = 1.25 * hud_fontsize.y * RANKINGS_RECEIVED_CNT;
 
        if (teamplay)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);