]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Replace more `vector_[xyz]` with `vector.[xyz]`
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 08:47:53 +0000 (19:47 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 08:47:53 +0000 (19:47 +1100)
86 files changed:
qcsrc/client/casings.qc
qcsrc/client/damage.qc
qcsrc/client/effects.qc
qcsrc/client/gibs.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/laser.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/miscfunctions.qh
qcsrc/client/movetypes.qc
qcsrc/client/particles.qc
qcsrc/client/prandom.qc
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/teamradar.qc
qcsrc/client/tturrets.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/view.qc
qcsrc/client/waypointsprites.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/animdecide.qc
qcsrc/common/mapinfo.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/util.qc
qcsrc/common/weapons/calculations.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/common/weapons/weapons.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/menu/draw.qc
qcsrc/menu/item/container.qc
qcsrc/menu/item/image.qc
qcsrc/menu/item/inputbox.qc
qcsrc/menu/item/listbox.qc
qcsrc/menu/menu.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_physics.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_triggers.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_race.qc
qcsrc/server/mutators/mutator_campcheck.qc
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/pathlib.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/scores.qc
qcsrc/server/steerlib.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_teleporters.qh
qcsrc/server/target_spawn.qc
qcsrc/server/tturrets/system/system_aimprocs.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/system/system_misc.qc
qcsrc/server/tturrets/units/unit_ewheel.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/weapons/hitplot.qc
qcsrc/warpzonelib/anglestransform.qc
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/mathlib.qc
qcsrc/warpzonelib/server.qc

index b7693efbb8d545670636b7730a2a73898b11de35..bd6053eccc79d58a01d93b76dcf4c0cb06466e07 100644 (file)
@@ -22,7 +22,7 @@ void Casing_Draw()
 {
        if(self.move_flags & FL_ONGROUND)
        {
-               self.move_angles_x = 0;
+               self.move_angles.x = 0;
                self.move_angles_z = 0;
                self.flags &= ~FL_ONGROUND;
        }
@@ -80,7 +80,7 @@ void Casing_Touch()
 void Casing_Damage(float thisdmg, int hittype, vector org, vector thisforce)
 {
        if(thisforce.z < 0)
-               thisforce_z = 0;
+               thisforce.z = 0;
        self.move_velocity = self.move_velocity + thisforce + '0 0 100';
        self.move_flags &= ~FL_ONGROUND;
 }
index 0313fbe9da6388a5216574b2edcba8569a23faa4..7d855e37c41fd9aed09b249d1292482b6d9a95bb 100644 (file)
@@ -133,9 +133,9 @@ void Ent_DamageInfo(float isNew)
        w_issilent = (w_deathtype & 0x8000);
        w_deathtype = (w_deathtype & 0x7FFF);
 
-       w_org_x = ReadCoord();
-       w_org_y = ReadCoord();
-       w_org_z = ReadCoord();
+       w_org.x = ReadCoord();
+       w_org.y = ReadCoord();
+       w_org.z = ReadCoord();
 
        dmg = ReadByte();
        rad = ReadByte();
index 1f03fdb457649d260c8875a38761b950363937b0..df688465739685158b99a52f0346115d2012818b 100644 (file)
@@ -81,8 +81,8 @@ void Net_ReadLightningarc()
 {
        vector from, to;
 
-    from_x = ReadCoord(); from_y = ReadCoord(); from_z = ReadCoord();
-    to_x = ReadCoord(); to_y = ReadCoord(); to_z = ReadCoord();
+    from.x = ReadCoord(); from.y = ReadCoord(); from.z = ReadCoord();
+    to.x = ReadCoord(); to.y = ReadCoord(); to.z = ReadCoord();
 
     if(autocvar_cl_effects_lightningarc_simple)
     {
index 2d8f48b1a7db5f75517771979f728adea19ef630..eb7d4787777c0435b67721dd874aff64a87592e7 100644 (file)
@@ -164,9 +164,9 @@ void Ent_GibSplash(bool isNew)
 
        type = ReadByte(); // gibbage type
        amount = ReadByte() / 16.0; // gibbage amount
-       org_x = ReadShort() * 4 + 2;
-       org_y = ReadShort() * 4 + 2;
-       org_z = ReadShort() * 4 + 2;
+       org.x = ReadShort() * 4 + 2;
+       org.y = ReadShort() * 4 + 2;
+       org.z = ReadShort() * 4 + 2;
        vel = decompressShortVector(ReadShort());
 
        float cl_gentle_gibs = autocvar_cl_gentle_gibs;
index 73eb6f1930e209c97821bdb00026b858f4f9e4b4..a33a851b8cad667a084575e80cd7d5e333402161 100644 (file)
@@ -27,7 +27,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
                drawpic(theOrigin, pic, theSize, theColor, theAlpha, 0);
                return;
     }
-       if (theBorderSize_x == 0 && theBorderSize_y == 0) // no border
+       if (theBorderSize.x == 0 && theBorderSize.y == 0) // no border
        {
                // draw only the central part
                drawsubpic(theOrigin, theSize, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
@@ -100,42 +100,42 @@ vector HUD_Get_Num_Color (float x, float maxvalue)
        float blinkingamt;
        vector color;
        if(x >= maxvalue) {
-               color_x = sin(2*M_PI*time);
-               color_y = 1;
-               color_z = sin(2*M_PI*time);
+               color.x = sin(2*M_PI*time);
+               color.y = 1;
+               color.z = sin(2*M_PI*time);
        }
        else if(x > maxvalue * 0.75) {
-               color_x = 0.4 - (x-150)*0.02 * 0.4; //red value between 0.4 -> 0
-               color_y = 0.9 + (x-150)*0.02 * 0.1; // green value between 0.9 -> 1
-               color_z = 0;
+               color.x = 0.4 - (x-150)*0.02 * 0.4; //red value between 0.4 -> 0
+               color.y = 0.9 + (x-150)*0.02 * 0.1; // green value between 0.9 -> 1
+               color.z = 0;
        }
        else if(x > maxvalue * 0.5) {
-               color_x = 1 - (x-100)*0.02 * 0.6; //red value between 1 -> 0.4
-               color_y = 1 - (x-100)*0.02 * 0.1; // green value between 1 -> 0.9
-               color_z = 1 - (x-100)*0.02; // blue value between 1 -> 0
+               color.x = 1 - (x-100)*0.02 * 0.6; //red value between 1 -> 0.4
+               color.y = 1 - (x-100)*0.02 * 0.1; // green value between 1 -> 0.9
+               color.z = 1 - (x-100)*0.02; // blue value between 1 -> 0
        }
        else if(x > maxvalue * 0.25) {
-               color_x = 1;
-               color_y = 1;
-               color_z = 0.2 + (x-50)*0.02 * 0.8; // blue value between 0.2 -> 1
+               color.x = 1;
+               color.y = 1;
+               color.z = 0.2 + (x-50)*0.02 * 0.8; // blue value between 0.2 -> 1
        }
        else if(x > maxvalue * 0.1) {
-               color_x = 1;
-               color_y = (x-20)*90/27/100; // green value between 0 -> 1
-               color_z = (x-20)*90/27/100 * 0.2; // blue value between 0 -> 0.2
+               color.x = 1;
+               color.y = (x-20)*90/27/100; // green value between 0 -> 1
+               color.z = (x-20)*90/27/100 * 0.2; // blue value between 0 -> 0.2
        }
        else {
-               color_x = 1;
-               color_y = 0;
-               color_z = 0;
+               color.x = 1;
+               color.y = 0;
+               color.z = 0;
        }
 
        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;
 }
@@ -158,7 +158,7 @@ void drawstringright(vector position, string text, vector theScale, vector rgb,
 
 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);
 }
 
@@ -538,8 +538,8 @@ void HUD_Weapons(void)
                                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
@@ -550,14 +550,14 @@ void HUD_Weapons(void)
                                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_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;
 
@@ -589,8 +589,8 @@ 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
                                {
@@ -607,7 +607,7 @@ void HUD_Weapons(void)
                                                panel_pos.y -= f * (panel_pos.y + panel_size.y);
                                }
                                if(f == 1)
-                                       center_x = -1; // mark the panel as off screen
+                                       center.x = -1; // mark the panel as off screen
                        }
                        weaponprevtime = time - (1 - f) * timein_effect_length;
                }
@@ -632,8 +632,8 @@ 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
                                {
@@ -656,7 +656,7 @@ void HUD_Weapons(void)
        // draw the background, then change the virtual size of it to better fit other items inside
        HUD_Panel_DrawBg(1);
 
-       if(center_x == -1)
+       if(center.x == -1)
        {
                draw_endBoldFont();
                return;
@@ -686,15 +686,15 @@ void HUD_Weapons(void)
 
                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)
@@ -1029,16 +1029,16 @@ void HUD_Ammo(void)
        if(ammo_size.x/ammo_size.y > 3)
        {
                newSize = 3 * ammo_size.y;
-               offset_x = ammo_size.x - newSize;
+               offset.x = ammo_size.x - newSize;
                pos.x += offset.x/2;
-               ammo_size_x = newSize;
+               ammo_size.x = newSize;
        }
        else
        {
                newSize = 1/3 * ammo_size.x;
-               offset_y = ammo_size.y - newSize;
+               offset.y = ammo_size.y - newSize;
                pos.y += offset.y/2;
-               ammo_size_y = newSize;
+               ammo_size.y = newSize;
        }
 
        float i;
@@ -1113,19 +1113,19 @@ void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, fl
        {
                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)
@@ -1151,19 +1151,19 @@ void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, fl
 
        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
@@ -1263,20 +1263,20 @@ 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;
+                       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;
+                       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
@@ -1285,17 +1285,17 @@ void HUD_Powerups(void)
                {
                        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;
                        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;
                }
        }
 
@@ -1509,17 +1509,17 @@ void HUD_HealthArmor(void)
                {
                        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;
                        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;
@@ -1910,10 +1910,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
@@ -2024,8 +2024,8 @@ void HUD_Radar(void)
                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);
+               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(
@@ -2321,16 +2321,16 @@ void HUD_Score(void)
                        if(score_size.x/score_size.y > 3)
                        {
                                newSize = 3 * score_size.y;
-                               offset_x = score_size.x - newSize;
+                               offset.x = score_size.x - newSize;
                                pos.x += offset.x/2;
-                               score_size_x = newSize;
+                               score_size.x = newSize;
                        }
                        else
                        {
                                newSize = 1/3 * score_size.x;
-                               offset_y = score_size.y - newSize;
+                               offset.y = score_size.y - newSize;
                                pos.y += offset.y/2;
-                               score_size_y = newSize;
+                               score_size.y = newSize;
                        }
                }
                else
@@ -2408,17 +2408,17 @@ void HUD_RaceTimer (void)
        vector newSize = '0 0 0';
        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;
 
@@ -2616,17 +2616,17 @@ void HUD_Vote(void)
        vector newSize = '0 0 0';
        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;
 
@@ -2712,14 +2712,14 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, flo
        if(mySize.x/mySize.y > aspect_ratio)
        {
                i = aspect_ratio * mySize.y;
-               myPos_x = myPos.x + (mySize.x - i) / 2;
-               mySize_x = i;
+               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;
-               mySize_y = i;
+               myPos.y = myPos.y + (mySize.y - i) / 2;
+               mySize.y = i;
        }
 
        if(layout)
@@ -3302,14 +3302,14 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, fl
        if(mySize.x/mySize.y > aspect_ratio)
        {
                i = aspect_ratio * mySize.y;
-               myPos_x = myPos.x + (mySize.x - i) / 2;
-               mySize_x = i;
+               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;
-               mySize_y = i;
+               myPos.y = myPos.y + (mySize.y - i) / 2;
+               mySize.y = i;
        }
 
        if (layout) // show text too
@@ -3450,17 +3450,17 @@ void HUD_PressedKeys(void)
                vector newSize = '0 0 0';
                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;
        }
@@ -3513,8 +3513,8 @@ void HUD_Chat(void)
 
        if(autocvar__con_chat_maximized && !autocvar__hud_configure) // draw at full screen height if maximized
        {
-               panel_pos_y = panel_bg_border;
-               panel_size_y = vid_conheight - panel_bg_border * 2;
+               panel_pos.y = panel_bg_border;
+               panel_size.y = vid_conheight - panel_bg_border * 2;
                if(panel.current_panel_bg == "0") // force a border when maximized
                {
                        string panel_bg;
@@ -3634,7 +3634,7 @@ void HUD_EngineInfo(void)
 //
 #define drawInfoMessage(s) do {                                                                                                                                                                                \
        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;                                                                                                                                                                                              \
 } while(0)
@@ -3661,17 +3661,17 @@ void HUD_InfoMessages(void)
        vector newSize = '0 0 0';
        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;
@@ -3916,17 +3916,17 @@ void HUD_Physics(void)
        {
                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;
                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)
@@ -3953,26 +3953,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;
+                       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);
                }
        }
@@ -4016,8 +4016,8 @@ void HUD_Physics(void)
                                        peak_offsetX = (1 - min(top_speed, max_speed)/max_speed) * panel_size.x;
                 else // if (speed_baralign == 2)
                     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;
+                               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_offsetX - peak_size.x), peak_size, autocvar_hud_progressbar_speed_color, f * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -4028,9 +4028,9 @@ void HUD_Physics(void)
                        }
 
                        //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 * 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);
                }
@@ -4057,12 +4057,12 @@ void HUD_Physics(void)
                        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;
+                               tmp_offset.x = 0;
+                       tmp_offset.y = 0;
                }
                else
                {
@@ -4072,10 +4072,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_offset_x = 0;
-       tmp_offset_y = (panel_size.y - tmp_size.y) / 2;
+       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;
        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);
 
@@ -4240,7 +4240,7 @@ void HUD_CenterPrint (void)
                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);
                }
        }
 
@@ -4355,7 +4355,7 @@ void HUD_CenterPrint (void)
                                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;
@@ -4370,7 +4370,7 @@ void HUD_CenterPrint (void)
                msg_size = pos.y - msg_size;
                if (autocvar_hud_panel_centerprint_flip)
                {
-                       pos_y = current_msg_posY - 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));
 
index bb9c368aed56aa91ff826150be21ea4862110698..0f4d93291e1bfaa24af8eb8ffb4ffdce739d2143 100644 (file)
@@ -253,39 +253,39 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
 
                // 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(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;
+                               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
                {
                        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;
+                               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
                {
                        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;
+                               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
                {
                        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;
+                               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);
@@ -306,15 +306,15 @@ 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));
@@ -365,12 +365,12 @@ 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;
+                       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);
+                               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)
                {
@@ -383,12 +383,12 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                        if (targEndPos.y <= resizeorigin.y - mySize.y)
                                continue;
 
-                       dist_x = panel_pos.x - resizeorigin.x;
-                       dist_y = resizeorigin.y - targEndPos.y;
+                       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);
+                               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)
                {
@@ -401,12 +401,12 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                        if (panel_pos.y >= resizeorigin.y + mySize.y)
                                continue;
 
-                       dist_x = resizeorigin.x - targEndPos.x;
-                       dist_y = panel_pos.y - resizeorigin.y;
+                       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);
+                               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)
                {
@@ -419,12 +419,12 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                        if (panel_pos.y >= resizeorigin.y + mySize.y)
                                continue;
 
-                       dist_x = panel_pos.x - resizeorigin.x;
-                       dist_y = panel_pos.y - resizeorigin.y;
+                       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);
+                               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);
@@ -442,13 +442,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|
@@ -456,30 +456,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;
+               mySize.x = mySize.x + myPos.x;
        if(myPos.y < 0)
-               mySize_y = mySize.y + myPos.y;
+               mySize.y = mySize.y + myPos.y;
 
        // bottom/right screen edges
        if(myPos.x + mySize.x > vid_conwidth)
-               mySize_x = vid_conwidth - myPos.x;
+               mySize.x = vid_conwidth - myPos.x;
        if(myPos.y + mySize.y > vid_conheight)
-               mySize_y = vid_conheight - myPos.y;
+               mySize.y = vid_conheight - myPos.y;
 
        //if(cvar("hud_configure_checkcollisions_debug"))
                //drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
@@ -487,30 +487,30 @@ 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"))
@@ -667,8 +667,8 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 
        if(bInputType == 3)
        {
-               mousepos_x = nPrimary;
-               mousepos_y = nSecondary;
+               mousepos.x = nPrimary;
+               mousepos.y = nSecondary;
                return true;
        }
 
@@ -787,7 +787,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                float level_height = vid_conheight / LEVELS_NUM;
 :find_tab_panel
                level = floor(tab_panel_pos.y / level_height) * level_height; //starting level
-               candidate_pos_x = (!tab_backward) ? vid_conwidth : 0;
+               candidate_pos.x = (!tab_backward) ? vid_conwidth : 0;
                start_posX = tab_panel_pos.x;
                tab_panel = world;
                k=0;
@@ -800,8 +800,8 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                                        continue;
                                HUD_Panel_UpdatePosSize();
                                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)) )  )
+                               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;
@@ -825,13 +825,13 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        {
                                level = (level + level_height) % vid_conheight;
                                start_posX = 0;
-                               candidate_pos_x = vid_conwidth;
+                               candidate_pos.x = vid_conwidth;
                        }
                        else
                        {
                                level = (level - level_height) % vid_conheight;
                                start_posX = vid_conwidth;
-                               candidate_pos_x = 0;
+                               candidate_pos.x = 0;
                        }
                }
 
@@ -873,9 +873,9 @@ 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;
+                       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;
+                       tmp_size.y = vid_conheight - panel_pos.y;
 
                if (panel_size == tmp_size)
                        return true;
@@ -1050,8 +1050,8 @@ void HUD_Panel_Highlight(float allow_move)
                        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_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;
                }
@@ -1062,8 +1062,8 @@ void HUD_Panel_Highlight(float allow_move)
                        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_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;
                }
@@ -1098,8 +1098,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)
@@ -1165,17 +1165,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);
                }
@@ -1209,10 +1209,10 @@ void HUD_Configure_DrawGrid()
        float i;
        if(autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha)
        {
-               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_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;
                vector s;
                // x-axis
                s = eX + eY * vid_conheight;
index a74c6683a26824b0d9ac091e48012d6fb0258ab1..91b8bca8f11525be871aa6b59f4f1a25184dc4ca 100644 (file)
@@ -87,16 +87,16 @@ void Ent_Laser()
 
        if(f & 1)
        {
-               self.origin_x = ReadCoord();
-               self.origin_y = ReadCoord();
-               self.origin_z = ReadCoord();
+               self.origin.x = ReadCoord();
+               self.origin.y = ReadCoord();
+               self.origin.z = ReadCoord();
                setorigin(self, self.origin);
        }
        if(f & 8)
        {
-               self.colormod_x = ReadByte() / 255.0;
-               self.colormod_y = ReadByte() / 255.0;
-               self.colormod_z = ReadByte() / 255.0;
+               self.colormod.x = ReadByte() / 255.0;
+               self.colormod.y = ReadByte() / 255.0;
+               self.colormod.z = ReadByte() / 255.0;
                if(f & 0x40)
                        self.alpha = ReadByte() / 255.0;
                else
@@ -117,14 +117,14 @@ void Ent_Laser()
        {
                if(f & 0x80)
                {
-                       self.velocity_x = ReadCoord();
-                       self.velocity_y = ReadCoord();
-                       self.velocity_z = ReadCoord();
+                       self.velocity.x = ReadCoord();
+                       self.velocity.y = ReadCoord();
+                       self.velocity.z = ReadCoord();
                }
                else
                {
-                       self.angles_x = ReadAngle();
-                       self.angles_y = ReadAngle();
+                       self.angles.x = ReadAngle();
+                       self.angles.y = ReadAngle();
                }
        }
        if(f & 4)
index 42140acedf912a574ded6b3c6813b44d0ba2851c..ae439f49e0c2b785537577c9b7c90bd7f2120333 100644 (file)
@@ -512,9 +512,9 @@ void Ent_ClientData()
        if(f & 8)
        {
                angles_held_status = 1;
-               angles_held_x = ReadAngle();
-               angles_held_y = ReadAngle();
-               angles_held_z = 0;
+               angles_held.x = ReadAngle();
+               angles_held.y = ReadAngle();
+               angles_held.z = 0;
        }
        else
                angles_held_status = 0;
@@ -662,9 +662,9 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
 {
        float teamnum = (ReadByte() - 1);
        vector spn_origin;
-       spn_origin_x = ReadShort();
-       spn_origin_y = ReadShort();
-       spn_origin_z = ReadShort();
+       spn_origin.x = ReadShort();
+       spn_origin.y = ReadShort();
+       spn_origin.z = ReadShort();
 
        if(is_new)
        {
index f6e86516f90cc726b9504c4bfb4578ba72cbdc15..df008d5bf249acba46233b8cbf879f904f3d2de5 100644 (file)
@@ -45,8 +45,8 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
        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;
-       rect_size_y = maxh + rect_margin;
+       rect_size.x = tsize + rect_margin;
+       rect_size.y = maxh + rect_margin;
        vector rgb = MapVote_RGB(id);
        vector offset = pos;
        float nlines = 0;
@@ -143,10 +143,10 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
 
        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
+       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);
 
@@ -161,8 +161,8 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        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';
@@ -195,7 +195,7 @@ 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);
 
@@ -264,8 +264,8 @@ 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 )
                        mv_selection_keyboard = 0;
@@ -285,28 +285,28 @@ void MapVote_Draw()
 
        hud_fontsize = HUD_GetFontsize("hud_fontsize");
 
-       pos_y = ymin;
-       pos_z = 0;
+       pos.y = ymin;
+       pos.z = 0;
 
        draw_beginBoldFont();
        map = ((gametypevote) ? _("Decide the gametype") : _("Vote for a map"));
-       pos_x = center - stringwidth(map, false, '12 0 0');
+       pos.x = center - stringwidth(map, false, '12 0 0');
        drawstring(pos, map, '24 24 0', '1 1 1', 1, DRAWFLAG_NORMAL);
        pos.y += 26;
 
        if( mapvote_chosenmap != "" )
        {
-               pos_x = center - stringwidth(mapvote_chosenmap, false, hud_fontsize*1.5/2);
+               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;
        }
 
        i = ceil(max(0, mv_timeout - time));
        map = sprintf(_("%d seconds left"), i);
-       pos_x = center - stringwidth(map, false, '8 0 0');
+       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_x = xmin;
+       pos.x = xmin;
        draw_endBoldFont();
 
        // base for multi-column stuff...
@@ -316,8 +316,8 @@ void MapVote_Draw()
 
        rows = ceil(mv_num_maps / mv_columns);
 
-       dist_x = (xmax - xmin) / mv_columns;
-       dist_y = (ymax - pos.y) / rows;
+       dist.x = (xmax - xmin) / mv_columns;
+       dist.y = (ymax - pos.y) / rows;
 
        if ( gametypevote )
        {
@@ -331,7 +331,7 @@ void MapVote_Draw()
                }
                else
                        dist.y += hud_fontsize.y;
-               pos_x = ( vid_conwidth - dist.x * mv_columns ) / 2;
+               pos.x = ( vid_conwidth - dist.x * mv_columns ) / 2;
        }
        else
        {
@@ -371,8 +371,8 @@ void MapVote_Draw()
 
        if(mv_abstain && i < mv_num_maps) {
                tmp = mv_votes[i];
-               pos_y = ymax + isize - hud_fontsize.y;
-               pos_x = (xmax+xmin)*0.5;
+               pos.y = ymax + isize - hud_fontsize.y;
+               pos.x = (xmax+xmin)*0.5;
                MapVote_DrawAbstain(pos, isize, xmax - xmin, tmp, i);
        }
 
@@ -645,8 +645,8 @@ float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary)
 
        if(bInputType == 3)
        {
-               mv_mousepos_x = nPrimary;
-               mv_mousepos_y = nSecondary;
+               mv_mousepos.x = nPrimary;
+               mv_mousepos.y = nSecondary;
                mv_selection_keyboard = 0;
                return true;
        }
index 449d89cd0e94b5dcde1d0bcf35bf6d78c83ed7f8..d74a24a320142d35e7da242c19f24586ca1e08fe 100644 (file)
@@ -129,11 +129,11 @@ vector HUD_GetFontsize(string cvarname)
 {
        vector v;
        v = stov(cvar_string(cvarname));
-       if(v_x == 0)
+       if(v.x == 0)
                v = '8 8 0';
-       if(v_y == 0)
-               v_y = v.x;
-       v_z = 0;
+       if(v.y == 0)
+               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;
 }
 
@@ -222,15 +222,15 @@ void drawborderlines(float thickness, vector pos, vector dim, vector color, floa
 
        // left and right lines
        pos.x -= thickness;
-       line_dim_x = thickness;
-       line_dim_y = dim.y;
+       line_dim.x = thickness;
+       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);
 
        // upper and lower lines
        pos.y -= thickness;
-       line_dim_x = dim.x + thickness * 2; // make upper and lower lines longer
-       line_dim_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);
 }
@@ -240,16 +240,16 @@ 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;
+       current_pos.y = pos.y;
        while (current_pos.y < end_pos.y)
        {
-               current_pos_x = 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;
                }
index f5830c489df35a4100ba3c46742fa82e90ed3a0b..323fbd0c79e92f254cf9dbae08e4805593aa8799 100644 (file)
@@ -60,12 +60,12 @@ string _drawpic_picpath;
                        _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;\
+                               _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;\
+                               _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);\
                        }\
@@ -103,11 +103,11 @@ void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theSc
        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;                                                                                                                                                                       \
+               sz.x = sz.y * textaspect;                                                                                                                                                                       \
                pos.x += (oldsz - sz.x) * 0.5;                                                                                                                                                          \
        } else {                                                                                                                                                                                                                \
                oldsz = sz.y;                                                                                                                                                                                           \
-               sz_y = sz.x / textaspect;                                                                                                                                                                       \
+               sz.y = sz.x / textaspect;                                                                                                                                                                       \
                pos.y += (oldsz - sz.y) * 0.5;                                                                                                                                                          \
        }                                                                                                                                                                                                                               \
 } while(0)
index 3b7b31f8dfd8d7175bfd3b02a7c0561c2c3c83b3..334fefc2493ca22af7c4f651872e0969e0786651 100644 (file)
@@ -49,11 +49,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;
                }
@@ -247,9 +247,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;
 }
index 66fdd6a0f6ad124943c66938631a6592e6099e86..6d2ddf87d5a431b3cf4c901b60881d868fb0e25b 100644 (file)
@@ -217,8 +217,8 @@ void Net_ReadVortexBeamParticle()
 {
        vector shotorg, endpos;
        float charge;
-       shotorg_x = ReadCoord(); shotorg_y = ReadCoord(); shotorg_z = ReadCoord();
-       endpos_x = ReadCoord(); endpos_y = ReadCoord(); endpos_z = ReadCoord();
+       shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
+       endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
        charge = ReadByte() / 255.0;
 
        pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
index 2281bba19156a966831a2ca79b53302a8846e64f..935f1421ed1379f26ce486ce56747fc8cf80385c 100644 (file)
@@ -29,9 +29,9 @@ vector prandomvec()
 
        do
        {
-               v_x = prandom();
-               v_y = prandom();
-               v_z = prandom();
+               v.x = prandom();
+               v.y = prandom();
+               v.z = prandom();
        }
        while(v * v > 1);
 
index 093c96575818360425efc954ffda8ba243800226..c6d871807f2e7c190af068a4ff192b760d3de57b 100644 (file)
@@ -688,9 +688,9 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
        is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
 
        if((rgb == '1 1 1') && (!is_spec)) {
-               rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
-               rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
-               rgb_z = autocvar_scoreboard_color_bg_b + 0.5; }
+               rgb.x = autocvar_scoreboard_color_bg_r + 0.5;
+               rgb.y = autocvar_scoreboard_color_bg_g + 0.5;
+               rgb.z = autocvar_scoreboard_color_bg_b + 0.5; }
 
        vector h_pos = pos - '1 1 0';
        vector h_size = item_size + '2 0 0';
@@ -700,9 +700,9 @@ 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_y = 0;
-       tmp_z = 0;
+       tmp.x = item_size.x;
+       tmp.y = 0;
+       tmp.z = 0;
        int i;
        for(i = 0; i < hud_num_fields; ++i)
        {
@@ -720,20 +720,20 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
                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);
@@ -753,7 +753,7 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
 
        if(hud_field[i] == SP_SEPARATOR)
        {
-               pos_x = xmax;
+               pos.x = xmax;
                for(i = hud_num_fields-1; i > 0; --i)
                {
                        field = hud_field[i];
@@ -769,20 +769,20 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
                        str = HUD_FixScoreboardColumnWidth(i, str);
 
                        if(field == SP_NAME) {
-                               tmp_x = hud_fixscoreboardcolumnwidth_len; // left or right aligned? let's put it right...
+                               tmp.x = hud_fixscoreboardcolumnwidth_len; // left or right aligned? let's put it right...
                                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;
+                               tmp.x = hud_fixscoreboardcolumnwidth_len;
                                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];
+                       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);
@@ -823,8 +823,8 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        pos.y += autocvar_scoreboard_border_thickness;
        pos -= '1 1 0';
 
-       tmp_x = sbwidth + 2;
-       tmp_y = 1.25 * hud_fontsize.y;
+       tmp.x = sbwidth + 2;
+       tmp.y = 1.25 * hud_fontsize.y;
 
        // rounded header
        if (teamplay)
@@ -839,13 +839,13 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        // separator header/table
        pos.y += 1.25 * hud_fontsize.y;
-       tmp_y = autocvar_scoreboard_border_thickness;
+       tmp.y = autocvar_scoreboard_border_thickness;
        drawfill(pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
        pos.y += autocvar_scoreboard_border_thickness;
 
        // table background
-       tmp_y = body_table_height;
+       tmp.y = body_table_height;
        if (teamplay)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        else
@@ -862,7 +862,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        if (scoreboard_highlight)
        {
-               column_dim_y = 1.25 * hud_fontsize.y; // header
+               column_dim.y = 1.25 * hud_fontsize.y; // header
                column_dim.y += autocvar_scoreboard_border_thickness;
                column_dim.y += body_table_height;
        }
@@ -874,7 +874,7 @@ 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)
@@ -885,8 +885,8 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        }
        if(hud_field[i] == SP_SEPARATOR)
        {
-               pos_x = xmax;
-               tmp_y = 0;
+               pos.x = xmax;
+               tmp.y = 0;
                for(i = hud_num_fields-1; i > 0; --i)
                {
                        if(hud_field[i] == SP_SEPARATOR)
@@ -899,28 +899,28 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                                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;
+                                               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 = stringwidth(hud_title[i], false, hud_fontsize);
+                       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;
                }
        }
        draw_endBoldFont();
 
-       pos_x = xmin;
+       pos.x = xmin;
        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.x = sbwidth;
+       tmp.y = hud_fontsize.y * 1.25;
 
        // fill the table and draw the rows
        i = 0;
@@ -985,8 +985,8 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        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;
        vector tmp = '0 0 0';
-       tmp_x = sbwidth;
-       tmp_y = height * rows;
+       tmp.x = sbwidth;
+       tmp.y = height * rows;
 
        if (teamplay)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
@@ -1078,9 +1078,9 @@ vector HUD_DrawKeyValue(vector pos, string key, string value) {
        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.x = px;
        pos.y+= hud_fontsize.y;
 
        return pos;
@@ -1116,8 +1116,8 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
 
        // draw table
        vector tmp = '0 0 0';
-       tmp_x = sbwidth;
-       tmp_y = hud_fontsize.y * rows;
+       tmp.x = sbwidth;
+       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);
@@ -1159,16 +1159,16 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
        float is_spec;
        is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
        vector hl_rgb;
-       hl_rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
-       hl_rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
-       hl_rgb_z = autocvar_scoreboard_color_bg_b + 0.5;
+       hl_rgb.x = autocvar_scoreboard_color_bg_r + 0.5;
+       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;
        drawstring(pos, _("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        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.x = sbwidth;
+       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);
@@ -1252,9 +1252,9 @@ void HUD_DrawScoreboard()
        sbwidth = xmax - xmin;
 
        // Initializes position
-       pos_x = xmin;
-       pos_y = ymin;
-       pos_z = 0;
+       pos.x = xmin;
+       pos.y = ymin;
+       pos.z = 0;
 
        // Heading
        vector sb_heading_fontsize;
@@ -1291,15 +1291,15 @@ void HUD_DrawScoreboard()
 
                        pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size);
                }
-               rgb_x = autocvar_scoreboard_color_bg_r;
-               rgb_y = autocvar_scoreboard_color_bg_g;
-               rgb_z = autocvar_scoreboard_color_bg_b;
+               rgb.x = autocvar_scoreboard_color_bg_r;
+               rgb.y = autocvar_scoreboard_color_bg_g;
+               rgb.z = autocvar_scoreboard_color_bg_b;
        }
        else
        {
-               rgb_x = autocvar_scoreboard_color_bg_r;
-               rgb_y = autocvar_scoreboard_color_bg_g;
-               rgb_z = autocvar_scoreboard_color_bg_b;
+               rgb.x = autocvar_scoreboard_color_bg_r;
+               rgb.y = autocvar_scoreboard_color_bg_g;
+               rgb.z = autocvar_scoreboard_color_bg_b;
 
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
                {
@@ -1339,9 +1339,9 @@ void HUD_DrawScoreboard()
        specs = 0;
        tmp = pos;
        vector item_size;
-       item_size_x = sbwidth;
-       item_size_y = hud_fontsize.y * 1.25;
-       item_size_z = 0;
+       item_size.x = sbwidth;
+       item_size.y = hud_fontsize.y * 1.25;
+       item_size.z = 0;
        for(pl = players.sort_next; pl; pl = pl.sort_next)
        {
                if(pl.team != NUM_SPECTATOR)
index ef61bb0cbcc1ae89ffed0fe95752a55d11105884..c6edf5040dbd1056b6f639fb4123bdcd0514ffe6 100644 (file)
@@ -69,7 +69,7 @@ void Draw_ShowNames(entity ent)
                                eo = project_3d_to_2d(e.origin);
                                if (!(eo.z < 0 || eo.x < 0 || eo.y < 0 || eo.x > vid_conwidth || eo.y > vid_conheight))
                                {
-                                       eo_z = 0;
+                                       eo.z = 0;
                                        if(vlen((eX * o.x + eY * o.y) - eo) < autocvar_hud_shownames_antioverlap_distance && vlen(ent.origin - view_origin) > vlen(e.origin - view_origin))
                                        {
                                                overlap = true;
@@ -141,7 +141,7 @@ void Draw_ShowNames(entity ent)
                // draw the sprite image
                if(o.z >= 0)
                {
-                       o_z = 0;
+                       o.z = 0;
 
                        vector myPos, mySize;
                        mySize = (eX * autocvar_hud_shownames_aspect + eY) * autocvar_hud_shownames_fontsize;
index 8f6b17e1bd069f7d95161a1b8fa6365e78a61c7e..7f84f0ef6ad7ed2c742c6c8f6f58cfe47956f501 100644 (file)
@@ -22,9 +22,9 @@ float vlen_minnorm2d(vector v)
 vector teamradar_3dcoord_to_texcoord(vector in)
 {
        vector out;
-       out_x = (in.x - mi_picmin.x) / (mi_picmax.x - mi_picmin.x);
-       out_y = (in.y - mi_picmin.y) / (mi_picmax.y - mi_picmin.y);
-       out_z = 0;
+       out.x = (in.x - mi_picmin.x) / (mi_picmax.x - mi_picmin.x);
+       out.y = (in.y - mi_picmin.y) / (mi_picmax.y - mi_picmin.y);
+       out.z = 0;
        return out;
 }
 
@@ -34,18 +34,18 @@ vector teamradar_texcoord_to_2dcoord(vector in)
        in -= teamradar_origin3d_in_texcoord;
 
        out = rotate(in, teamradar_angle * DEG2RAD);
-       out_y = - out.y; // screen space is reversed
+       out.y = - out.y; // screen space is reversed
 
        out = out * teamradar_size;
        if(v_flipped)
-               out_x = -out.x;
+               out.x = -out.x;
        out += teamradar_origin2d;
        return out;
 }
 
 vector yinvert(vector v)
 {
-       v_y = 1 - v.y;
+       v.y = 1 - v.y;
        return v;
 }
 
@@ -86,15 +86,15 @@ void draw_teamradar_player(vector coord3d, vector pangles, vector rgb)
        makevectors(pangles - '0 1 0' * teamradar_angle);
        if(v_flipped)
        {
-               v_forward_x = -v_forward.x;
-               v_right_x = -v_right.x;
-               v_up_x = -v_up.x;
+               v_forward.x = -v_forward.x;
+               v_right.x = -v_right.x;
+               v_up.x = -v_up.x;
        }
-       v_forward_z = 0;
+       v_forward.z = 0;
        v_forward = normalize(v_forward);
        v_forward.y *= -1.0;
-       v_right_x = -v_forward.y;
-       v_right_y = v_forward.x;
+       v_right.x = -v_forward.y;
+       v_right.y = v_forward.x;
 
        if(rgb == '1 1 1')
                rgb2 = '0 0 0';
@@ -148,10 +148,10 @@ void draw_teamradar_link(vector start, vector end, int colors)
        start = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(start));
        end = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(end));
        norm = normalize(start - end);
-       norm_z = norm.x;
-       norm_x = -norm.y;
-       norm_y = norm.z;
-       norm_z = 0;
+       norm.z = norm.x;
+       norm.x = -norm.y;
+       norm.y = norm.z;
+       norm.z = 0;
 
        c0 = colormapPaletteColor(colors & 0x0F, false);
        c1 = colormapPaletteColor((colors & 0xF0) / 0x10, false);
@@ -183,8 +183,8 @@ void teamradar_loadcvars()
        // match this to defaultXonotic.cfg!
        if(!hud_panel_radar_scale) hud_panel_radar_scale = 4096;
        if(!hud_panel_radar_foreground_alpha) hud_panel_radar_foreground_alpha = 0.8 * panel_fg_alpha;
-       if(!hud_panel_radar_size.x) hud_panel_radar_size_x = 128;
-       if(!hud_panel_radar_size.y) hud_panel_radar_size_y = hud_panel_radar_size.x;
+       if(!hud_panel_radar_size.x) hud_panel_radar_size.x = 128;
+       if(!hud_panel_radar_size.y) hud_panel_radar_size.y = hud_panel_radar_size.x;
 }
 
 // radar links
index 50a39b684f19ba5112e5069b45ddc5151827d297..d2469851ca53f21c813d5bd629b01833f57f1847 100644 (file)
@@ -259,7 +259,7 @@ void turret_draw2d()
         || o.x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))
         || o.y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
             return; // Dont draw wp's for turrets out of view
-        o_z = 0;
+        o.z = 0;
         if(hud != HUD_NORMAL)
         {
             switch(hud)
@@ -338,7 +338,7 @@ void turret_draw2d()
        || o.y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
            return; // Dont draw wp's for turrets out of view
 
-       o_z = 0;
+       o.z = 0;
 
        float edgedistance_min, crosshairdistance;
                edgedistance_min = min((o.y - (vid_conheight * waypointsprite_edgeoffset_top)),
index b40620c7856fdf2169bc84717d637c8c9e9e26dd..290385e495fcdd389aa4629b22fbe773a159d961 100644 (file)
@@ -95,8 +95,8 @@ void AuxiliaryXhair_Draw2D()
     loc = project_3d_to_2d(self.move_origin) - 0.5 * psize;
     if (!(loc.z < 0 || loc.x < 0 || loc.y < 0 || loc.x > vid_conwidth || loc.y > vid_conheight))
     {
-        loc_z = 0;
-        psize_z = 0;
+        loc.z = 0;
+        psize.z = 0;
         drawpic(loc, self.axh_image, psize, self.colormod, self.alpha, self.axh_drawflag);
     }
 
@@ -251,8 +251,8 @@ void CSQC_BUMBLE_HUD()
        HUD_GETSTATS
 
     picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-    hudloc_y = vid_conheight - picsize.y;
-    hudloc_x = vid_conwidth * 0.5 - picsize.x * 0.5;
+    hudloc.y = vid_conheight - picsize.y;
+    hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5;
 
     drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
 
@@ -402,8 +402,8 @@ void CSQC_BUMBLE_GUN_HUD()
        HUD_GETSTATS
 
     picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-    hudloc_y = vid_conheight - picsize.y;
-    hudloc_x = vid_conwidth * 0.5 - picsize.x * 0.5;
+    hudloc.y = vid_conheight - picsize.y;
+    hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5;
 
     drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
 
@@ -524,8 +524,8 @@ void CSQC_SPIDER_HUD()
        HUD_GETSTATS
 
     picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-    hudloc_y = vid_conheight - picsize.y;
-    hudloc_x = vid_conwidth * 0.5 - picsize.x * 0.5;
+    hudloc.y = vid_conheight - picsize.y;
+    hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5;
 
     drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
 
@@ -686,8 +686,8 @@ void CSQC_RAPTOR_HUD()
        HUD_GETSTATS
 
     picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-    hudloc_y = vid_conheight - picsize.y;
-    hudloc_x = vid_conwidth * 0.5 - picsize.x * 0.5;
+    hudloc.y = vid_conheight - picsize.y;
+    hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5;
 
     drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
 
@@ -827,7 +827,7 @@ void CSQC_RAPTOR_HUD()
             {
                 where.x -= picsize.x * 0.5;
                 where.y -= picsize.y * 0.5;
-                where_z = 0;
+                where.z = 0;
                 drawpic(where, raptor_drop, picsize, '0 2 0', 1, DRAWFLAG_ADDITIVE);
             }
             dropmark.cnt = time + 5;
@@ -844,7 +844,7 @@ void CSQC_RAPTOR_HUD()
                 {
                     where.x -= picsize.x * 0.5;
                     where.y -= picsize.y * 0.5;
-                    where_z = 0;
+                    where.z = 0;
                     drawpic(where, raptor_drop, picsize, '2 0 0', 1, DRAWFLAG_ADDITIVE);
                 }
             }
@@ -880,8 +880,8 @@ void CSQC_WAKIZASHI_HUD()
        HUD_GETSTATS
 
     picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-    hudloc_y = vid_conheight - picsize.y;
-    hudloc_x = vid_conwidth * 0.5 - picsize.x * 0.5;
+    hudloc.y = vid_conheight - picsize.y;
+    hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5;
 
     drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
 
index 4330ecbdc2e24ed7993eb58a0a2ce7054ee52f23..6efd6c54a488c8438e2c51a092436a9e9ca7be8e 100644 (file)
@@ -70,7 +70,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;
@@ -272,7 +272,7 @@ float EnemyHitCheck()
 {
        float t, n;
        wcross_origin = project_3d_to_2d(trace_endpos);
-       wcross_origin_z = 0;
+       wcross_origin.z = 0;
        if(trace_ent)
                n = trace_ent.entnum;
        else
@@ -352,7 +352,7 @@ float TrueAimCheck()
                trueaimpoint = traceorigin + view_forward * g_trueaim_minrange;
 
        if(vecs.x > 0)
-               vecs_y = -vecs.y;
+               vecs.y = -vecs.y;
        else
                vecs = '0 0 0';
 
@@ -566,7 +566,7 @@ void UpdateCrosshair()
 
                // wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
                wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);
-               wcross_origin_z = 0;
+               wcross_origin.z = 0;
                if(autocvar_crosshair_hittest)
                {
                        vector wcross_oldorigin;
@@ -633,40 +633,40 @@ void UpdateCrosshair()
                                //y = green
                                //z = blue
 
-                               wcross_color_z = 0;
+                               wcross_color.z = 0;
 
                                if(x > 200)
                                {
-                                       wcross_color_x = 0;
-                                       wcross_color_y = 1;
+                                       wcross_color.x = 0;
+                                       wcross_color.y = 1;
                                }
                                else if(x > 150)
                                {
-                                       wcross_color_x = 0.4 - (x-150)*0.02 * 0.4;
-                                       wcross_color_y = 0.9 + (x-150)*0.02 * 0.1;
+                                       wcross_color.x = 0.4 - (x-150)*0.02 * 0.4;
+                                       wcross_color.y = 0.9 + (x-150)*0.02 * 0.1;
                                }
                                else if(x > 100)
                                {
-                                       wcross_color_x = 1 - (x-100)*0.02 * 0.6;
-                                       wcross_color_y = 1 - (x-100)*0.02 * 0.1;
-                                       wcross_color_z = 1 - (x-100)*0.02;
+                                       wcross_color.x = 1 - (x-100)*0.02 * 0.6;
+                                       wcross_color.y = 1 - (x-100)*0.02 * 0.1;
+                                       wcross_color.z = 1 - (x-100)*0.02;
                                }
                                else if(x > 50)
                                {
-                                       wcross_color_x = 1;
-                                       wcross_color_y = 1;
-                                       wcross_color_z = 0.2 + (x-50)*0.02 * 0.8;
+                                       wcross_color.x = 1;
+                                       wcross_color.y = 1;
+                                       wcross_color.z = 0.2 + (x-50)*0.02 * 0.8;
                                }
                                else if(x > 20)
                                {
-                                       wcross_color_x = 1;
-                                       wcross_color_y = (x-20)*90/27/100;
-                                       wcross_color_z = (x-20)*90/27/100 * 0.2;
+                                       wcross_color.x = 1;
+                                       wcross_color.y = (x-20)*90/27/100;
+                                       wcross_color.z = (x-20)*90/27/100 * 0.2;
                                }
                                else
                                {
-                                       wcross_color_x = 1;
-                                       wcross_color_y = 0;
+                                       wcross_color.x = 1;
+                                       wcross_color.y = 0;
                                }
                                break;
                        }
@@ -1476,17 +1476,17 @@ void CSQC_UpdateView(float w, float h)
                {
                        if(autocvar_cl_reticle_stretch)
                        {
-                               reticle_size_x = vid_conwidth;
-                               reticle_size_y = vid_conheight;
-                               reticle_pos_x = 0;
-                               reticle_pos_y = 0;
+                               reticle_size.x = vid_conwidth;
+                               reticle_size.y = vid_conheight;
+                               reticle_pos.x = 0;
+                               reticle_pos.y = 0;
                        }
                        else
                        {
-                               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_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;
                        }
 
                        if(zoomscript_caught)
@@ -1562,25 +1562,25 @@ void CSQC_UpdateView(float w, float h)
                {
                        if(autocvar_hud_contents_blur && contentavgalpha)
                        {
-                               content_blurpostprocess_x = 1;
-                               content_blurpostprocess_y = contentavgalpha * autocvar_hud_contents_blur;
-                               content_blurpostprocess_z = contentavgalpha * autocvar_hud_contents_blur_alpha;
+                               content_blurpostprocess.x = 1;
+                               content_blurpostprocess.y = contentavgalpha * autocvar_hud_contents_blur;
+                               content_blurpostprocess.z = contentavgalpha * autocvar_hud_contents_blur_alpha;
                        }
                        else
                        {
-                               content_blurpostprocess_x = 0;
-                               content_blurpostprocess_y = 0;
-                               content_blurpostprocess_z = 0;
+                               content_blurpostprocess.x = 0;
+                               content_blurpostprocess.y = 0;
+                               content_blurpostprocess.z = 0;
                        }
                }
        }
 
        if(autocvar_hud_damage && !getstati(STAT_FROZEN))
        {
-               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_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;
 
                float myhealth_flash_temp;
                myhealth = getstati(STAT_HEALTH);
@@ -1648,15 +1648,15 @@ void CSQC_UpdateView(float w, float h)
                {
                        if(autocvar_hud_damage_blur && myhealth_flash_temp)
                        {
-                               damage_blurpostprocess_x = 1;
-                               damage_blurpostprocess_y = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur;
-                               damage_blurpostprocess_z = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur_alpha;
+                               damage_blurpostprocess.x = 1;
+                               damage_blurpostprocess.y = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur;
+                               damage_blurpostprocess.z = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur_alpha;
                        }
                        else
                        {
-                               damage_blurpostprocess_x = 0;
-                               damage_blurpostprocess_y = 0;
-                               damage_blurpostprocess_z = 0;
+                               damage_blurpostprocess.x = 0;
+                               damage_blurpostprocess.y = 0;
+                               damage_blurpostprocess.z = 0;
                        }
                }
        }
@@ -1846,8 +1846,8 @@ void CSQC_Demo_Camera()
                dir = normalize(view_origin - current_position);
                n = mouse_angles.z;
                mouse_angles = vectoangles(dir);
-               mouse_angles_x = mouse_angles.x * -1;
-               mouse_angles_z = n;
+               mouse_angles.x = mouse_angles.x * -1;
+               mouse_angles.z = n;
        }
        else
        {
@@ -1859,10 +1859,10 @@ void CSQC_Demo_Camera()
                }
        }
 
-       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';
@@ -1879,10 +1879,10 @@ 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';
@@ -1890,10 +1890,10 @@ void CSQC_Demo_Camera()
 
        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;
        }
 
index 2b4ffd68471b21e49aafa4106e71905550d8f34d..788dd871eed84f74e2050375211ef9eca122ee20 100644 (file)
@@ -130,13 +130,13 @@ vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a,
 
        // we want to be onscreen
        if(o.x < 0)
-               o_x = 0;
+               o.x = 0;
        if(o.y < 0)
-               o_y = 0;
+               o.y = 0;
        if(o.x > vid_conwidth - w)
-               o_x = vid_conwidth - w;
+               o.x = vid_conwidth - w;
        if(o.y > vid_conheight - h)
-               o_x = vid_conheight - h;
+               o.x = vid_conheight - h;
 
        o.x += 0.5 * (w - sw);
 
@@ -257,13 +257,13 @@ vector fixrgbexcess(vector rgb)
                {
                        rgb = fixrgbexcess_move(rgb, '0 1 0', '0 0 1');
                        if(rgb.z > 1)
-                               rgb_z = 1;
+                               rgb.z = 1;
                }
                else if(rgb.z > 1)
                {
                        rgb = fixrgbexcess_move(rgb, '0 0 1', '0 1 0');
                        if(rgb.y > 1)
-                               rgb_y = 1;
+                               rgb.y = 1;
                }
        }
        else if(rgb.y > 1)
@@ -273,13 +273,13 @@ vector fixrgbexcess(vector rgb)
                {
                        rgb = fixrgbexcess_move(rgb, '1 0 0', '0 0 1');
                        if(rgb.z > 1)
-                               rgb_z = 1;
+                               rgb.z = 1;
                }
                else if(rgb.z > 1)
                {
                        rgb = fixrgbexcess_move(rgb, '0 0 1', '1 0 0');
                        if(rgb.x > 1)
-                               rgb_x = 1;
+                               rgb.x = 1;
                }
        }
        else if(rgb.z > 1)
@@ -289,13 +289,13 @@ vector fixrgbexcess(vector rgb)
                {
                        rgb = fixrgbexcess_move(rgb, '1 0 0', '0 1 0');
                        if(rgb.y > 1)
-                               rgb_y = 1;
+                               rgb.y = 1;
                }
                else if(rgb.y > 1)
                {
                        rgb = fixrgbexcess_move(rgb, '0 1 0', '1 0 0');
                        if(rgb.x > 1)
-                               rgb_x = 1;
+                               rgb.x = 1;
                }
        }
        return rgb;
@@ -459,7 +459,7 @@ void Draw_WaypointSprite()
                ang = atan2(-d.x, -d.y);
 #endif
        }
-       o_z = 0;
+       o.z = 0;
 
        float edgedistance_min, crosshairdistance;
                edgedistance_min = min((o.y - (vid_conheight * waypointsprite_edgeoffset_top)),
index 54095e7c4002cd00d8a420497616c48335519f06..1d306fede6d6ce8733529821d373a7e16a371a0f 100644 (file)
@@ -105,7 +105,7 @@ void Projectile_Draw()
 
        vector ang;
        ang = self.angles;
-       ang_x = -ang.x;
+       ang.x = -ang.x;
        makevectors(ang);
 
        a = 1 - (time - self.fade_time) * self.fade_rate;
index c457d5ca7fb5bd2c4792f74f60c4120a88c8304a..ecc840f6fbbe41358d381d26a8c12ffaac59de2d 100644 (file)
@@ -237,9 +237,9 @@ void animdecide_setimplicitstate(entity e, float onground)
 
        makevectors(e.angles);
        vector v;
-       v_x = e.velocity * v_forward;
-       v_y = e.velocity * v_right;
-       v_z = 0;
+       v.x = e.velocity * v_forward;
+       v.y = e.velocity * v_right;
+       v.z = 0;
 
        // we want to match like this:
        // the 8 directions shall be "evenly spaced"
index 914e1dee591a7045f3024859dfe813658e25ae1c..41c14683104495d12e53e1e9743b0ffd04da378e 100644 (file)
@@ -310,12 +310,12 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
                        if(k == "origin")
                        {
                                o = stov(strcat("'", v, "'"));
-                               mapMins_x = min(mapMins.x, o.x);
-                               mapMins_y = min(mapMins.y, o.y);
-                               mapMins_z = min(mapMins.z, o.z);
-                               mapMaxs_x = max(mapMaxs.x, o.x);
-                               mapMaxs_y = max(mapMaxs.y, o.y);
-                               mapMaxs_z = max(mapMaxs.z, o.z);
+                               mapMins.x = min(mapMins.x, o.x);
+                               mapMins.y = min(mapMins.y, o.y);
+                               mapMins.z = min(mapMins.z, o.z);
+                               mapMaxs.x = max(mapMaxs.x, o.x);
+                               mapMaxs.y = max(mapMaxs.y, o.y);
+                               mapMaxs.z = max(mapMaxs.z, o.z);
                        }
                        else if(k == "race_place")
                        {
@@ -1090,12 +1090,12 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                                                print("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
                                        else
                                        {
-                                               MapInfo_Map_mins_x = a;
-                                               MapInfo_Map_mins_y = b;
-                                               MapInfo_Map_mins_z = c;
-                                               MapInfo_Map_maxs_x = d;
-                                               MapInfo_Map_maxs_y = e;
-                                               MapInfo_Map_maxs_z = f;
+                                               MapInfo_Map_mins.x = a;
+                                               MapInfo_Map_mins.y = b;
+                                               MapInfo_Map_mins.z = c;
+                                               MapInfo_Map_maxs.x = d;
+                                               MapInfo_Map_maxs.y = e;
+                                               MapInfo_Map_maxs.z = f;
                                        }
                                }
                        }
index 29209172c6f347065e732d6c9bedf3cb32e4504c..59bcfa5d03b4fac3f7705ab1ba5f288f7448d0d4 100644 (file)
@@ -576,7 +576,7 @@ vector monster_pickmovetarget(entity targ)
 
                                if(((self.flags & FL_FLY) && (self.spawnflags & MONSTERFLAG_FLY_VERTICAL)) || (self.flags & FL_SWIM))
                                {
-                                       pos_z = random() * 200;
+                                       pos.z = random() * 200;
                                        if(random() >= 0.5)
                                                pos.z *= -1;
                                }
index 5d9997aaa94a29e93e5bc9dcdb6bf43cd9986111..89e1c228a800f49cc52f0d3a6ab5fd1b32d39dd9 100644 (file)
@@ -567,20 +567,20 @@ vector decompressShortVector(int data)
 
        if(p == 0)
        {
-               out_x = 0;
-               out_y = 0;
+               out.x = 0;
+               out.y = 0;
                if(y == 31)
-                       out_z = -1;
+                       out.z = -1;
                else
-                       out_z = +1;
+                       out.z = +1;
        }
        else
        {
                y   = .19634954084936207740 * y;
                p = .19634954084936207740 * p - 1.57079632679489661922;
-               out_x = cos(y) *  cos(p);
-               out_y = sin(y) *  cos(p);
-               out_z =          -sin(p);
+               out.x = cos(y) *  cos(p);
+               out.y = sin(y) *  cos(p);
+               out.z =          -sin(p);
        }
 
        //print("decompressed: ", vtos(out), "\n");
@@ -596,7 +596,7 @@ float compressShortVector(vector vec)
                return 0;
        //print("compress: ", vtos(vec), "\n");
        ang = vectoangles(vec);
-       ang_x = -ang.x;
+       ang.x = -ang.x;
        if(ang.x < -90)
                ang.x += 360;
        if(ang.x < -90 && ang.x > +90)
@@ -803,7 +803,7 @@ void get_mi_min_max(float mode)
                                         MOVE_WORLDONLY,
                                         world);
                        if(!trace_startsolid)
-                               mi_min_x = trace_endpos.x;
+                               mi_min.x = trace_endpos.x;
 
                        tracebox('0 1 0' * mi.y,
                                         '1 0 0' * mi.x + '0 0 1' * mi.z,
@@ -812,7 +812,7 @@ void get_mi_min_max(float mode)
                                         MOVE_WORLDONLY,
                                         world);
                        if(!trace_startsolid)
-                               mi_min_y = trace_endpos.y;
+                               mi_min.y = trace_endpos.y;
 
                        tracebox('0 0 1' * mi.z,
                                         '1 0 0' * mi.x + '0 1 0' * mi.y,
@@ -821,7 +821,7 @@ void get_mi_min_max(float mode)
                                         MOVE_WORLDONLY,
                                         world);
                        if(!trace_startsolid)
-                               mi_min_z = trace_endpos.z;
+                               mi_min.z = trace_endpos.z;
 
                        tracebox('1 0 0' * ma.x,
                                         '0 1 0' * mi.y + '0 0 1' * mi.z,
@@ -830,7 +830,7 @@ void get_mi_min_max(float mode)
                                         MOVE_WORLDONLY,
                                         world);
                        if(!trace_startsolid)
-                               mi_max_x = trace_endpos.x;
+                               mi_max.x = trace_endpos.x;
 
                        tracebox('0 1 0' * ma.y,
                                         '1 0 0' * mi.x + '0 0 1' * mi.z,
@@ -839,7 +839,7 @@ void get_mi_min_max(float mode)
                                         MOVE_WORLDONLY,
                                         world);
                        if(!trace_startsolid)
-                               mi_max_y = trace_endpos.y;
+                               mi_max.y = trace_endpos.y;
 
                        tracebox('0 0 1' * ma.z,
                                         '1 0 0' * mi.x + '0 1 0' * mi.y,
@@ -848,7 +848,7 @@ void get_mi_min_max(float mode)
                                         MOVE_WORLDONLY,
                                         world);
                        if(!trace_startsolid)
-                               mi_max_z = trace_endpos.z;
+                               mi_max.z = trace_endpos.z;
                }
        }
 }
@@ -1078,45 +1078,45 @@ vector hue_mi_ma_to_rgb(float hue, float mi, float ma)
        //      hue = 60 * (rgb_y - rgb_z) / (ma - mi);
        if(hue <= 1)
        {
-               rgb_x = ma;
-               rgb_y = hue * (ma - mi) + mi;
-               rgb_z = mi;
+               rgb.x = ma;
+               rgb.y = hue * (ma - mi) + mi;
+               rgb.z = mi;
        }
        //else if(ma == rgb_y)
        //      hue = 60 * (rgb_z - rgb_x) / (ma - mi) + 120;
        else if(hue <= 2)
        {
-               rgb_x = (2 - hue) * (ma - mi) + mi;
-               rgb_y = ma;
-               rgb_z = mi;
+               rgb.x = (2 - hue) * (ma - mi) + mi;
+               rgb.y = ma;
+               rgb.z = mi;
        }
        else if(hue <= 3)
        {
-               rgb_x = mi;
-               rgb_y = ma;
-               rgb_z = (hue - 2) * (ma - mi) + mi;
+               rgb.x = mi;
+               rgb.y = ma;
+               rgb.z = (hue - 2) * (ma - mi) + mi;
        }
        //else // if(ma == rgb_z)
        //      hue = 60 * (rgb_x - rgb_y) / (ma - mi) + 240;
        else if(hue <= 4)
        {
-               rgb_x = mi;
-               rgb_y = (4 - hue) * (ma - mi) + mi;
-               rgb_z = ma;
+               rgb.x = mi;
+               rgb.y = (4 - hue) * (ma - mi) + mi;
+               rgb.z = ma;
        }
        else if(hue <= 5)
        {
-               rgb_x = (hue - 4) * (ma - mi) + mi;
-               rgb_y = mi;
-               rgb_z = ma;
+               rgb.x = (hue - 4) * (ma - mi) + mi;
+               rgb.y = mi;
+               rgb.z = ma;
        }
        //else if(ma == rgb_x)
        //      hue = 60 * (rgb_y - rgb_z) / (ma - mi);
        else // if(hue <= 6)
        {
-               rgb_x = ma;
-               rgb_y = mi;
-               rgb_z = (6 - hue) * (ma - mi) + mi;
+               rgb.x = ma;
+               rgb.y = mi;
+               rgb.z = (6 - hue) * (ma - mi) + mi;
        }
 
        return rgb;
@@ -1130,13 +1130,13 @@ vector rgb_to_hsv(vector rgb)
        mi = min(rgb.x, rgb.y, rgb.z);
        ma = max(rgb.x, rgb.y, rgb.z);
 
-       hsv_x = rgb_mi_ma_to_hue(rgb, mi, ma);
-       hsv_z = ma;
+       hsv.x = rgb_mi_ma_to_hue(rgb, mi, ma);
+       hsv.z = ma;
 
        if(ma == 0)
-               hsv_y = 0;
+               hsv.y = 0;
        else
-               hsv_y = 1 - mi/ma;
+               hsv.y = 1 - mi/ma;
 
        return hsv;
 }
@@ -1154,15 +1154,15 @@ vector rgb_to_hsl(vector rgb)
        mi = min(rgb.x, rgb.y, rgb.z);
        ma = max(rgb.x, rgb.y, rgb.z);
 
-       hsl_x = rgb_mi_ma_to_hue(rgb, mi, ma);
+       hsl.x = rgb_mi_ma_to_hue(rgb, mi, ma);
 
-       hsl_z = 0.5 * (mi + ma);
+       hsl.z = 0.5 * (mi + ma);
        if(mi == ma)
-               hsl_y = 0;
+               hsl.y = 0;
        else if(hsl.z <= 0.5)
-               hsl_y = (ma - mi) / (2*hsl.z);
+               hsl.y = (ma - mi) / (2*hsl.z);
        else // if(hsl_z > 0.5)
-               hsl_y = (ma - mi) / (2 - 2*hsl.z);
+               hsl.y = (ma - mi) / (2 - 2*hsl.z);
 
        return hsl;
 }
@@ -1592,15 +1592,15 @@ vector solve_quadratic(float a, float b, float c) // ax^2 + bx + c = 0
        {
                if(b != 0)
                {
-                       v_x = v_y = -c / b;
-                       v_z = 1;
+                       v.x = v.y = -c / b;
+                       v.z = 1;
                }
                else
                {
                        if(c == 0)
                        {
                                // actually, every number solves the equation!
-                               v_z = 1;
+                               v.z = 1;
                        }
                }
        }
@@ -1612,26 +1612,26 @@ vector solve_quadratic(float a, float b, float c) // ax^2 + bx + c = 0
                        D = sqrt(D);
                        if(a > 0) // put the smaller solution first
                        {
-                               v_x = ((-b)-D) / (2*a);
-                               v_y = ((-b)+D) / (2*a);
+                               v.x = ((-b)-D) / (2*a);
+                               v.y = ((-b)+D) / (2*a);
                        }
                        else
                        {
-                               v_x = (-b+D) / (2*a);
-                               v_y = (-b-D) / (2*a);
+                               v.x = (-b+D) / (2*a);
+                               v.y = (-b-D) / (2*a);
                        }
-                       v_z = 1;
+                       v.z = 1;
                }
                else
                {
                        // complex solutions!
                        D = sqrt(-D);
-                       v_x = -b / (2*a);
+                       v.x = -b / (2*a);
                        if(a > 0)
-                               v_y =  D / (2*a);
+                               v.y =  D / (2*a);
                        else
-                               v_y = -D / (2*a);
-                       v_z = 0;
+                               v.y = -D / (2*a);
+                       v.z = 0;
                }
        }
        return v;
@@ -1766,9 +1766,9 @@ float compressShotOrigin(vector v)
 vector decompressShotOrigin(int f)
 {
        vector v;
-       v_x = ((f & 0xFF0000) / 0x10000) / 2;
-       v_y = ((f & 0xFF00) / 0x100 - 128) / 4;
-       v_z = ((f & 0xFF) - 128) / 4;
+       v.x = ((f & 0xFF0000) / 0x10000) / 2;
+       v.y = ((f & 0xFF00) / 0x100 - 128) / 4;
+       v.z = ((f & 0xFF) - 128) / 4;
        return v;
 }
 
@@ -1866,16 +1866,16 @@ vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype
        healthdamage = (h - 1) / (1 - armorblock); // damage we can take if we could use more health
        armordamage = a + (h - 1); // damage we can take if we could use more armor
        armorideal = healthdamage * armorblock;
-       v_y = armorideal;
+       v.y = armorideal;
        if(armordamage < healthdamage)
        {
-               v_x = armordamage;
-               v_z = 1;
+               v.x = armordamage;
+               v.z = 1;
        }
        else
        {
-               v_x = healthdamage;
-               v_z = 0;
+               v.x = healthdamage;
+               v.z = 0;
        }
        return v;
 }
@@ -1885,9 +1885,9 @@ vector healtharmor_applydamage(float a, float armorblock, float deathtype, float
        vector v;
        if (deathtype == DEATH_DROWN)  // Why should armor help here...
                armorblock = 0;
-       v_y = bound(0, damage * armorblock, a); // save
-       v_x = bound(0, damage - v.y, damage); // take
-       v_z = 0;
+       v.y = bound(0, damage * armorblock, a); // save
+       v.x = bound(0, damage - v.y, damage); // take
+       v.z = 0;
        return v;
 }
 #endif
@@ -1915,17 +1915,17 @@ int ReadInt24_t()
 vector ReadInt48_t()
 {
        vector v;
-       v_x = ReadInt24_t();
-       v_y = ReadInt24_t();
-       v_z = 0;
+       v.x = ReadInt24_t();
+       v.y = ReadInt24_t();
+       v.z = 0;
        return v;
 }
 vector ReadInt72_t()
 {
        vector v;
-       v_x = ReadInt24_t();
-       v_y = ReadInt24_t();
-       v_z = ReadInt24_t();
+       v.x = ReadInt24_t();
+       v.y = ReadInt24_t();
+       v.z = ReadInt24_t();
        return v;
 }
 #else
@@ -2160,7 +2160,7 @@ float get_model_parameters(string m, float sk)
 
 vector vec2(vector v)
 {
-       v_z = 0;
+       v.z = 0;
        return v;
 }
 
@@ -2172,9 +2172,9 @@ vector NearestPointOnBox(entity box, vector org)
        m1 = box.mins + box.origin;
        m2 = box.maxs + box.origin;
 
-       nearest_x = bound(m1_x, org.x, m2_x);
-       nearest_y = bound(m1_y, org.y, m2_y);
-       nearest_z = bound(m1_z, org.z, m2_z);
+       nearest.x = bound(m1_x, org.x, m2_x);
+       nearest.y = bound(m1_y, org.y, m2_y);
+       nearest.z = bound(m1_z, org.z, m2_z);
 
        return nearest;
 }
@@ -2585,7 +2585,7 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
 #ifdef SVQC
 vector combine_to_vector(float x, float y, float z)
 {
-       vector result; result_x = x; result_y = y; result_z = z;
+       vector result; result.x = x; result.y = y; result.z = z;
        return result;
 }
 
@@ -2654,9 +2654,9 @@ string CCR(string input)
 vector vec3(float x, float y, float z)
 {
        vector v;
-       v_x = x;
-       v_y = y;
-       v_z = z;
+       v.x = x;
+       v.y = y;
+       v.z = z;
        return v;
 }
 
@@ -2664,7 +2664,7 @@ vector vec3(float x, float y, float z)
 vector animfixfps(entity e, vector a, vector b)
 {
        // multi-frame anim: keep as-is
-       if(a_y == 1)
+       if(a.y == 1)
        {
                float dur;
                dur = frameduration(e.modelindex, a.x);
@@ -2674,7 +2674,7 @@ vector animfixfps(entity e, vector a, vector b)
                        dur = frameduration(e.modelindex, a.x);
                }
                if(dur > 0)
-                       a_z = 1.0 / dur;
+                       a.z = 1.0 / dur;
        }
        return a;
 }
index d2ec53bfae9d80b75c25688c4ea9c76d4b5ff7b8..82adfdb1af087936bdb837f53217ba154207e60b 100644 (file)
@@ -136,9 +136,9 @@ vector solve_cubic_abcd(float a, float b, float c, float d)
 vector findperpendicular(vector v)
 {
        vector p;
-       p_x = v.z;
-       p_y = -v.x;
-       p_z = v.y;
+       p.x = v.z;
+       p.y = -v.x;
+       p.z = v.y;
        return normalize(cliptoplane(p, v));
 }
 
index 0aa59b1d5e481ce9b15c56293c8d5bdd45322f3d..30decbf9b7c4f1e135ec32035dc8c8ab63522c1c 100644 (file)
@@ -404,8 +404,8 @@ void W_Crylink_Attack(void)
                else
                {
                        makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
-                       s_y = v_forward.x;
-                       s_z = v_forward.y;
+                       s.y = v_forward.x;
+                       s.z = v_forward.y;
                }
                s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
                W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, false);
@@ -514,8 +514,8 @@ void W_Crylink_Attack2(void)
                        else
                        {
                                makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
-                               s_y = v_forward.x;
-                               s_z = v_forward.y;
+                               s.y = v_forward.x;
+                               s.z = v_forward.y;
                        }
                        s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
                        s = w_shotdir + right * s.y + up * s.z;
index 4289efd7dfa2a6f95cb94799eed09745196a012f..ff55145d6ccc76aa03743e84189e2e417640eee4 100644 (file)
@@ -268,8 +268,8 @@ void W_Hagar_Attack2_Load_Release(void)
                else
                {
                        makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
-                       s_y = v_forward.x;
-                       s_z = v_forward.y;
+                       s.y = v_forward.x;
+                       s.z = v_forward.y;
                }
                s = s * WEP_CVAR_SEC(hagar, load_spread) * g_weaponspreadfactor;
                
index 7311c6e00d3d220e66dc950917c2fde56f40c4bc..15b4545e281d4b97e5c8318ef1f3d4343ad25cd5 100644 (file)
@@ -782,8 +782,8 @@ void Draw_Shockwave()
        {
                // perfect circle effect lines
                makevectors('0 360 0' * (0.75 + (counter - 0.5) / divisions));
-               angle_y = v_forward.x;
-               angle_z = v_forward.y;
+               angle.y = v_forward.x;
+               angle.z = v_forward.y;
 
                // first do the spread_to_min effect
                deviation = angle * spread_to_min;
index 7b107607d2c01230c27473988c70af7c90527f72..18a6dc6c6f1b21858d96d83d183a4585e2738dc2 100644 (file)
@@ -106,11 +106,11 @@ void WriteWepSet(float dst, WepSet w)
 WepSet WepSet_GetFromStat()
 {
        WepSet w = '0 0 0';
-       w_x = getstati(STAT_WEAPONS);
+       w.x = getstati(STAT_WEAPONS);
 #if WEP_MAXCOUNT > 24
-       w_y = getstati(STAT_WEAPONS2);
+       w.y = getstati(STAT_WEAPONS2);
 #if WEP_MAXCOUNT > 48
-       w_z = getstati(STAT_WEAPONS3);
+       w.z = getstati(STAT_WEAPONS3);
 #endif
 #endif
        return w;
index ad71a02eb80a39ad9d1a81ab0368ce663991976e..23196bef71d32af02d513ae70d9e40f246791b65 100644 (file)
@@ -1340,9 +1340,9 @@ void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
        vector oldup = v_up;
        vector v = eyetarget - self.origin;
        vector modeleyetarget;
-       modeleyetarget_x =   v * v_forward;
-       modeleyetarget_y = 0-v * v_right;
-       modeleyetarget_z =   v * v_up;
+       modeleyetarget.x =   v * v_forward;
+       modeleyetarget.y = 0-v * v_right;
+       modeleyetarget.z =   v * v_up;
        // this is an eyeball, make it point at the target location
        // first get all the data we can...
        vector relorg = skel_get_bonerel(self.skeletonindex, bonenum);
@@ -1360,11 +1360,11 @@ void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
        // get the vector from the eyeball to the target
        vector u = modeleyetarget - boneorg;
        // now transform it inversely by the parent matrix to produce new rel vectors
-       v_x = u * parentforward;
-       v_y = u * parentright;
-       v_z = u * parentup;
+       v.x = u * parentforward;
+       v.y = u * parentright;
+       v.z = u * parentup;
        vector ang = vectoangles2(v, relup);
-       ang_x = 0 - ang.x;
+       ang.x = 0 - ang.x;
        makevectors(ang);
        // set the relative bone matrix
        skel_set_bone(self.skeletonindex, bonenum, relorg);
index 7a7c3cb0f6e998e34ffa238fda2dd78d2a1be48d..6be1efcb38286a11fc6a8465e214e276a2f5d314 100644 (file)
@@ -2036,10 +2036,10 @@ void(entity own, vector start, vector end) te_beam = #431;
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
 //globals:
-.float dphitcontentsmask; // if non-zero on the entity passed to traceline/tracebox/tracetoss this will override the normal collidable contents rules and instead hit these contents values (for example AI can use tracelines that hit DONOTENTER if it wants to, by simply changing this field on the entity passed to traceline), this affects normal movement as well as trace calls
-float trace_dpstartcontents; // DPCONTENTS_ value at start position of trace
-float trace_dphitcontents; // DPCONTENTS_ value of impacted surface (not contents at impact point, just contents of the surface that was hit)
-float trace_dphitq3surfaceflags; // Q3SURFACEFLAG_ value of impacted surface
+.int dphitcontentsmask; // if non-zero on the entity passed to traceline/tracebox/tracetoss this will override the normal collidable contents rules and instead hit these contents values (for example AI can use tracelines that hit DONOTENTER if it wants to, by simply changing this field on the entity passed to traceline), this affects normal movement as well as trace calls
+int trace_dpstartcontents; // DPCONTENTS_ value at start position of trace
+int trace_dphitcontents; // DPCONTENTS_ value of impacted surface (not contents at impact point, just contents of the surface that was hit)
+int trace_dphitq3surfaceflags; // Q3SURFACEFLAG_ value of impacted surface
 string trace_dphittexturename; // texture name of impacted surface
 //constants:
 const int DPCONTENTS_SOLID = 1; // hit a bmodel, not a bounding box
@@ -2260,9 +2260,9 @@ void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
        vector oldup = v_up;
        vector v = eyetarget - self.origin;
        vector modeleyetarget;
-       modeleyetarget_x =   v * v_forward;
-       modeleyetarget_y = 0-v * v_right;
-       modeleyetarget_z =   v * v_up;
+       modeleyetarget.x =   v * v_forward;
+       modeleyetarget.y = 0-v * v_right;
+       modeleyetarget.z =   v * v_up;
        // this is an eyeball, make it point at the target location
        // first get all the data we can...
        vector relorg = skel_get_bonerel(self.skeletonindex, bonenum);
@@ -2280,11 +2280,11 @@ void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
        // get the vector from the eyeball to the target
        vector u = modeleyetarget - boneorg;
        // now transform it inversely by the parent matrix to produce new rel vectors
-       v_x = u * parentforward;
-       v_y = u * parentright;
-       v_z = u * parentup;
+       v.x = u * parentforward;
+       v.y = u * parentright;
+       v.z = u * parentup;
        vector ang = vectoangles2(v, relup);
-       ang_x = 0 - ang.x;
+       ang.x = 0 - ang.x;
        makevectors(ang);
        // set the relative bone matrix
        skel_set_bone(self.skeletonindex, bonenum, relorg);
index fa7c65c51cde498ef3ec7bdb03446345a32bb586..05e7af227adccb9040870bc7e690e405a7b1d400 100644 (file)
@@ -82,7 +82,7 @@ string draw_PreloadPictureWithFlags(string pic, float f)
 
 void draw_Picture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha)
 {
-       if(theSize_x == 0 || theSize.y <= 0) // no default sizing please
+       if(theSize.x == 0 || theSize.y <= 0) // no default sizing please
                return;
        pic = draw_UseSkinFor(pic);
        drawpic(boxToGlobal(theOrigin, draw_shift, draw_scale), pic, boxToGlobalSize(theSize, draw_scale), theColor, theAlpha * draw_alpha, 0);
@@ -308,7 +308,7 @@ float draw_TextWidth(string theText, float ICanHasKallerz, vector SizeThxBye)
        vector v;
        v = '0 0 0';
        //float r;
-       v_x = stringwidth(theText, ICanHasKallerz, globalToBoxSize(boxToGlobalSize(SizeThxBye, draw_scale), draw_fontscale));
+       v.x = stringwidth(theText, ICanHasKallerz, globalToBoxSize(boxToGlobalSize(SizeThxBye, draw_scale), draw_fontscale));
        v = globalToBoxSize(v, draw_scale);
        return v.x;
 }
index 2bf2ef1df3d5fa87c00c72e42406f5eeafd1453d..dc369862f3c8bf61fe9d2584af9263059f11b3f6 100644 (file)
@@ -291,15 +291,15 @@ void Container_addItem(entity me, entity other, vector theOrigin, vector theSize
        if(theSize.x > 1)
        {
                theOrigin.x -= 0.5 * (theSize.x - 1);
-               theSize_x = 1;
+               theSize.x = 1;
        }
        if(theSize.y > 1)
        {
                theOrigin.y -= 0.5 * (theSize.y - 1);
-               theSize_y = 1;
+               theSize.y = 1;
        }
-       theOrigin_x = bound(0, theOrigin.x, 1 - theSize.x);
-       theOrigin_y = bound(0, theOrigin.y, 1 - theSize.y);
+       theOrigin.x = bound(0, theOrigin.x, 1 - theSize.x);
+       theOrigin.y = bound(0, theOrigin.y, 1 - theSize.y);
 
        other.parent = me;
        other.Container_origin = theOrigin;
index 1b5aa59a057048392e8711164821f62ed1ad9614..b67df840cc7f8e58134592ee4332fdd04370c9d3 100644 (file)
@@ -74,8 +74,8 @@ void Image_updateAspect(entity me)
                        if(sz.x <= 0 || sz.y <= 0)
                        {
                                // image is broken or doesn't exist, set the size for the placeholder image
-                               sz_x = me.size.x;
-                               sz_y = me.size.y;
+                               sz.x = me.size.x;
+                               sz.y = me.size.y;
                        }
                        asp = sz.x / sz.y;
                }
index e85cfa0e8282113f9a15a95837498acd8fe7f871..d3f68152e3fc8812736a54ea62dc8e44b4636036 100644 (file)
@@ -304,17 +304,17 @@ void InputBox_draw(entity me)
                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+2, 1));
                                        if (component >= 0) // ^xr found
                                        {
-                                               theTempColor_x = component/15;
+                                               theTempColor.x = component/15;
 
                                                component = HEXDIGIT_TO_DEC(substring(me.text, i+3, 1));
                                                if (component >= 0) // ^xrg found
                                                {
-                                                       theTempColor_y = component/15;
+                                                       theTempColor.y = component/15;
 
                                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+4, 1));
                                                        if (component >= 0) // ^xrgb found
                                                        {
-                                                               theTempColor_z = component/15;
+                                                               theTempColor.z = component/15;
                                                                theColor = theTempColor;
                                                                w = draw_TextWidth(substring(me.text, i, 5), 0, me.realFontSize);
 
index 208367ae70b82b4d1445b2395b83821084018538..5eb945e39e7bc53d864a16bb659665ea4b5df353 100644 (file)
@@ -344,7 +344,7 @@ void ListBox_draw(entity me)
        if(me.pressed == 2)
                me.mouseDrag(me, me.dragScrollPos); // simulate mouseDrag event
        me.updateControlTopBottom(me);
-       fillSize_x = (1 - me.controlWidth);
+       fillSize.x = (1 - me.controlWidth);
        if(me.alphaBG)
                draw_Fill('0 0 0', '0 1 0' + fillSize, me.colorBG, me.alphaBG);
        if(me.controlWidth)
index ec19cb9e1f017275bd265ccc692178cd6669cdaa..94d167e5ed560d3de78073a9c11db770bf81ad2c 100644 (file)
@@ -357,7 +357,7 @@ void drawBackground(string img, float a, string algn, float force1)
        string c;
        float scalemode;
 
-       v_z = 0;
+       v.z = 0;
 
        scalemode = SCALEMODE_CROP;
 
@@ -372,17 +372,17 @@ void drawBackground(string img, float a, string algn, float force1)
                        case "h": scalemode = SCALEMODE_HEIGHT; goto nopic;
                        case "w": scalemode = SCALEMODE_WIDTH; goto nopic;
                        case "s": scalemode = SCALEMODE_STRETCH; goto nopic;
-                       case "1": case "4": case "7": v_x = 0.0; break;
-                       case "2": case "5": case "8": v_x = 0.5; break;
-                       case "3": case "6": case "9": v_x = 1.0; break;
-                       default: v_x = random(); break;
+                       case "1": case "4": case "7": v.x = 0.0; break;
+                       case "2": case "5": case "8": v.x = 0.5; break;
+                       case "3": case "6": case "9": v.x = 1.0; break;
+                       default: v.x = random(); break;
                }
                switch(c)
                {
-                       case "7": case "8": case "9": v_y = 0.0; break;
-                       case "4": case "5": case "6": v_y = 0.5; break;
-                       case "1": case "2": case "3": v_y = 1.0; break;
-                       default: v_y = random(); break;
+                       case "7": case "8": case "9": v.y = 0.0; break;
+                       case "4": case "5": case "6": v.y = 0.5; break;
+                       case "1": case "2": case "3": v.y = 1.0; break;
+                       default: v.y = random(); break;
                }
                if(l == 0)
                        draw_Picture_Aligned(v, scalemode, img, a);
@@ -432,13 +432,13 @@ float m_allocatetooltipbox(vector pos)
        vector avoidplus, avoidminus;
        vector v;
 
-       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
-       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
-       avoidplus_z = 0;
+       avoidplus.x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
+       avoidplus.y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
+       avoidplus.z = 0;
 
-       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize.x;
-       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize.y;
-       avoidminus_z = 0;
+       avoidminus.x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize.x;
+       avoidminus.y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize.y;
+       avoidminus.z = 0;
 
        // bottom right
        v = pos + avoidplus;
@@ -446,27 +446,27 @@ float m_allocatetooltipbox(vector pos)
                return true;
 
        // bottom center
-       v_x = pos.x - menuTooltipSize.x * 0.5;
+       v.x = pos.x - menuTooltipSize.x * 0.5;
        if(m_testtooltipbox(v))
                return true;
 
        // bottom left
-       v_x = pos.x - avoidminus.x;
+       v.x = pos.x - avoidminus.x;
        if(m_testtooltipbox(v))
                return true;
 
        // top left
-       v_y = pos.y - avoidminus.y;
+       v.y = pos.y - avoidminus.y;
        if(m_testtooltipbox(v))
                return true;
 
        // top center
-       v_x = pos.x - menuTooltipSize.x * 0.5;
+       v.x = pos.x - menuTooltipSize.x * 0.5;
        if(m_testtooltipbox(v))
                return true;
 
        // top right
-       v_x = pos.x + avoidplus.x;
+       v.x = pos.x + avoidplus.x;
        if(m_testtooltipbox(v))
                return true;
 
@@ -578,7 +578,7 @@ void m_tooltip(vector pos)
                                        menuTooltipState = 1;
                                        menuTooltipItem = it;
 
-                                       menuTooltipOrigin_x = -1; // unallocated
+                                       menuTooltipOrigin.x = -1; // unallocated
 
                                        if (menuTooltipText)
                                                strunzone(menuTooltipText);
@@ -595,9 +595,9 @@ void m_tooltip(vector pos)
                                                if(f > w)
                                                        w = f;
                                        }
-                                       menuTooltipSize_x = w + 2 * (SKINMARGIN_TOOLTIP_x / conwidth);
-                                       menuTooltipSize_y = i * fontsize.y + 2 * (SKINMARGIN_TOOLTIP_y / conheight);
-                                       menuTooltipSize_z = 0;
+                                       menuTooltipSize.x = w + 2 * (SKINMARGIN_TOOLTIP_x / conwidth);
+                                       menuTooltipSize.y = i * fontsize.y + 2 * (SKINMARGIN_TOOLTIP_y / conheight);
+                                       menuTooltipSize.z = 0;
                                }
                                break;
                        case 1:
@@ -830,8 +830,8 @@ void m_draw(float width, float height)
                                maxpos = globalToBox(eX * (realconwidth - 1) + eY * (realconheight - 1), draw_shift, draw_scale);
                                dMouse = globalToBoxSize(dMouse, draw_scale);
                                menuMousePos += dMouse * cvar("menu_mouse_speed");
-                               menuMousePos_x = bound(minpos.x, menuMousePos.x, maxpos.x);
-                               menuMousePos_y = bound(minpos.y, menuMousePos.y, maxpos.y);
+                               menuMousePos.x = bound(minpos.x, menuMousePos.x, maxpos.x);
+                               menuMousePos.y = bound(minpos.y, menuMousePos.y, maxpos.y);
                                if(mouseButtonsPressed)
                                        main.mouseDrag(main, menuMousePos);
                                else
index 485071731c0935677bdcc6820110a95f7937b013..b529ed1c32f2899650b7dd498024f2b5b6bb0929 100644 (file)
@@ -61,7 +61,7 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f
 
                        return true;
                }
-               dir_z = dir.z + 0.1; // aim up a little more
+               dir.z = dir.z + 0.1; // aim up a little more
                c = c + 1;
        }
        targ.solid = savesolid;
@@ -189,9 +189,9 @@ float bot_aimdir(vector v, float maxfiredeviation)
        desiredang = vectoangles(v) + self.bot_badaimoffset;
        //dprint(" desired:", vtos(desiredang));
        if (desiredang.x >= 180)
-               desiredang_x = desiredang.x - 360;
-       desiredang_x = bound(-90, 0 - desiredang.x, 90);
-       desiredang_z = self.v_angle.z;
+               desiredang.x = desiredang.x - 360;
+       desiredang.x = bound(-90, 0 - desiredang.x, 90);
+       desiredang.z = self.v_angle.z;
        //dprint(" / ", vtos(desiredang));
 
        //// pain throws off aim
@@ -204,9 +204,9 @@ float bot_aimdir(vector v, float maxfiredeviation)
        // calculate turn angles
        diffang = (desiredang - self.bot_olddesiredang);
        // wrap yaw turn
-       diffang_y = diffang.y - floor(diffang.y / 360) * 360;
+       diffang.y = diffang.y - floor(diffang.y / 360) * 360;
        if (diffang.y >= 180)
-               diffang_y = diffang.y - 360;
+               diffang.y = diffang.y - 360;
        self.bot_olddesiredang = desiredang;
        //dprint(" diff:", vtos(diffang));
 
@@ -238,9 +238,9 @@ float bot_aimdir(vector v, float maxfiredeviation)
        // calculate turn angles
        diffang = desiredang - self.bot_mouseaim;
        // wrap yaw turn
-       diffang_y = diffang.y - floor(diffang.y / 360) * 360;
+       diffang.y = diffang.y - floor(diffang.y / 360) * 360;
        if (diffang.y >= 180)
-               diffang_y = diffang.y - 360;
+               diffang.y = diffang.y - 360;
        //dprint(" diff:", vtos(diffang));
 
        if (time >= self.bot_aimthinktime)
@@ -253,17 +253,17 @@ float bot_aimdir(vector v, float maxfiredeviation)
 
        diffang = self.bot_mouseaim - desiredang;
        // wrap yaw turn
-       diffang_y = diffang.y - floor(diffang.y / 360) * 360;
+       diffang.y = diffang.y - floor(diffang.y / 360) * 360;
        if (diffang.y >= 180)
-               diffang_y = diffang.y - 360;
+               diffang.y = diffang.y - 360;
        desiredang = desiredang + diffang * bound(0,autocvar_bot_ai_aimskill_think,1);
 
        // calculate turn angles
        diffang = desiredang - self.v_angle;
        // wrap yaw turn
-       diffang_y = diffang.y - floor(diffang.y / 360) * 360;
+       diffang.y = diffang.y - floor(diffang.y / 360) * 360;
        if (diffang.y >= 180)
-               diffang_y = diffang.y - 360;
+               diffang.y = diffang.y - 360;
        //dprint(" diff:", vtos(diffang));
 
        // jitter tracking
index 6022fe857537984875b54df9900c68a5dd831c67..0d92acbd28cab30cc2117cb3245867a8e9e97fb0 100644 (file)
@@ -138,7 +138,7 @@ void havocbot_ai()
                //dprint(vtos(now), ":", vtos(next), "=", vtos(v), " (blend ", ftos(blend), ")\n");
                //v = now * (distanceblend) + next * (1-distanceblend);
                if (self.waterlevel < WATERLEVEL_SWIMMING)
-                       v_z = 0;
+                       v.z = 0;
                //dprint("walk at:", vtos(v), "\n");
                //te_lightning2(world, self.origin, self.goalcurrent.origin);
                bot_aimdir(v, -1);
@@ -204,38 +204,38 @@ void havocbot_keyboard_movement(vector destorg)
        // at skill >= 4.5, all cases allowed
        if (keyboard.x > trigger)
        {
-               keyboard_x = 1;
+               keyboard.x = 1;
                if (sk < 2.5)
-                       keyboard_y = 0;
+                       keyboard.y = 0;
        }
        else if (keyboard.x < trigger1 && sk > 1.5)
        {
-               keyboard_x = -1;
+               keyboard.x = -1;
                if (sk < 4.5)
-                       keyboard_y = 0;
+                       keyboard.y = 0;
        }
        else
        {
-               keyboard_x = 0;
+               keyboard.x = 0;
                if (sk < 1.5)
-                       keyboard_y = 0;
+                       keyboard.y = 0;
        }
        if (sk < 4.5)
-               keyboard_z = 0;
+               keyboard.z = 0;
 
        if (keyboard.y > trigger)
-               keyboard_y = 1;
+               keyboard.y = 1;
        else if (keyboard.y < trigger1)
-               keyboard_y = -1;
+               keyboard.y = -1;
        else
-               keyboard_y = 0;
+               keyboard.y = 0;
 
        if (keyboard.z > trigger)
-               keyboard_z = 1;
+               keyboard.z = 1;
        else if (keyboard.z < trigger1)
-               keyboard_z = -1;
+               keyboard.z = -1;
        else
-               keyboard_z = 0;
+               keyboard.z = 0;
 
        self.havocbot_keyboard = keyboard * maxspeed;
        if (self.havocbot_ducktime>time) self.BUTTON_CROUCH=true;
@@ -322,8 +322,8 @@ void havocbot_bunnyhop(vector dir)
                                        {
                                                gno = (self.goalstack01.absmin + self.goalstack01.absmax) * 0.5;
                                                deviation = vectoangles(gno - self.origin) - vectoangles(gco - self.origin);
-                                               while (deviation.y < -180) deviation_y = deviation.y + 360;
-                                               while (deviation.y > 180) deviation_y = deviation.y - 360;
+                                               while (deviation.y < -180) deviation.y = deviation.y + 360;
+                                               while (deviation.y > 180) deviation.y = deviation.y - 360;
 
                                                if(fabs(deviation.y) < 20)
                                                if(bunnyhopdistance < vlen(self.origin - gno))
@@ -373,8 +373,8 @@ void havocbot_bunnyhop(vector dir)
                if(vlen(self.velocity)>maxspeed)
                {
                        deviation = vectoangles(dir) - vectoangles(self.velocity);
-                       while (deviation.y < -180) deviation_y = deviation.y + 360;
-                       while (deviation.y > 180) deviation_y = deviation.y - 360;
+                       while (deviation.y < -180) deviation.y = deviation.y + 360;
+                       while (deviation.y > 180) deviation.y = deviation.y - 360;
 
                        if(fabs(deviation.y)>10)
                                self.movement_x = 0;
@@ -440,7 +440,7 @@ void havocbot_movetogoal()
                        float db, v, d;
                        vector dxy;
 
-                       dxy = self.origin - ( ( self.goalcurrent.absmin + self.goalcurrent.absmax ) * 0.5 ); dxy_z = 0;
+                       dxy = self.origin - ( ( self.goalcurrent.absmin + self.goalcurrent.absmax ) * 0.5 ); dxy.z = 0;
                        d = vlen(dxy);
                        v = vlen(self.velocity -  self.velocity.z * '0 0 1');
                        db = (pow(v,2) / (autocvar_g_jetpack_acceleration_side * 2)) + 100;
@@ -628,7 +628,7 @@ void havocbot_movetogoal()
        {
                dir = '0 0 0';
                if(self.waterlevel>WATERLEVEL_SWIMMING)
-                       dir_z = 1;
+                       dir.z = 1;
                else if(self.velocity.z >= 0 && !(self.waterlevel == WATERLEVEL_WETFEET && self.watertype == CONTENT_WATER))
                        self.BUTTON_JUMP = true;
                else
@@ -660,13 +660,13 @@ void havocbot_movetogoal()
        m1 = self.goalcurrent.origin + self.goalcurrent.mins;
        m2 = self.goalcurrent.origin + self.goalcurrent.maxs;
        destorg = self.origin;
-       destorg_x = bound(m1_x, destorg.x, m2_x);
-       destorg_y = bound(m1_y, destorg.y, m2_y);
-       destorg_z = bound(m1_z, destorg.z, m2_z);
+       destorg.x = bound(m1_x, destorg.x, m2_x);
+       destorg.y = bound(m1_y, destorg.y, m2_y);
+       destorg.z = bound(m1_z, destorg.z, m2_z);
        diff = destorg - self.origin;
        //dist = vlen(diff);
        dir = normalize(diff);
-       flatdir = diff;flatdir_z = 0;
+       flatdir = diff;flatdir.z = 0;
        flatdir = normalize(flatdir);
        gco = (self.goalcurrent.absmin + self.goalcurrent.absmax) * 0.5;
 
@@ -790,8 +790,8 @@ void havocbot_movetogoal()
                        }
 
                        dir = flatdir;
-                       evadeobstacle_z = 0;
-                       evadelava_z = 0;
+                       evadeobstacle.z = 0;
+                       evadelava.z = 0;
                        makevectors(self.v_angle.y * '0 1 0');
 
                        if(evadeobstacle!='0 0 0'||evadelava!='0 0 0')
@@ -815,12 +815,12 @@ void havocbot_movetogoal()
                if(self.goalcurrent.origin.z + self.goalcurrent.mins.z > self.origin.z + self.mins.z)
                {
                        if(self.origin.z + self.mins.z  < self.ladder_entity.origin.z + self.ladder_entity.maxs.z)
-                               dir_z = 1;
+                               dir.z = 1;
                }
                else
                {
                        if(self.origin.z + self.mins.z  > self.ladder_entity.origin.z + self.ladder_entity.mins.z)
-                               dir_z = -1;
+                               dir.z = -1;
                }
        }
 
@@ -1078,12 +1078,12 @@ void havocbot_aim()
        self.nextaim = time + 0.1;
        selfvel = self.velocity;
        if (!self.waterlevel)
-               selfvel_z = 0;
+               selfvel.z = 0;
        if (self.enemy)
        {
                enemyvel = self.enemy.velocity;
                if (!self.enemy.waterlevel)
-                       enemyvel_z = 0;
+                       enemyvel.z = 0;
                lag_additem(time + self.ping, 0, 0, self.enemy, self.origin, selfvel, (self.enemy.absmin + self.enemy.absmax) * 0.5, enemyvel);
        }
        else
@@ -1146,7 +1146,7 @@ float havocbot_moveto(vector pos)
 
                // Heading
                vector dir = ( ( self.goalcurrent.absmin + self.goalcurrent.absmax ) * 0.5 ) - (self.origin + self.view_ofs);
-               dir_z = 0;
+               dir.z = 0;
                bot_aimdir(dir, -1);
 
                // Go!
index d98a9ab79b6ef09f8d8a0794579436799fd948c6..e1c66797269fa0b2cda0dc65b570173903de9a36 100644 (file)
@@ -29,7 +29,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
        }
 
        move = end - start;
-       move_z = 0;
+       move.z = 0;
        org = start;
        dist = totaldist = vlen(move);
        dir = normalize(move);
@@ -387,7 +387,7 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom
        }
 
        org = ent.origin + 0.5 * (ent.mins + ent.maxs);
-       org_z = ent.origin.z + ent.mins.z - PL_MIN_z; // player height
+       org.z = ent.origin.z + ent.mins.z - PL_MIN_z; // player height
        // TODO possibly make other code have the same support for bboxes
        if(ent.tag_entity)
                org = org + ent.tag_entity.origin;
@@ -408,9 +408,9 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom
                                vector wm1, wm2;
                                wm1 = w.origin + w.mins;
                                wm2 = w.origin + w.maxs;
-                               v_x = bound(wm1_x, org.x, wm2_x);
-                               v_y = bound(wm1_y, org.y, wm2_y);
-                               v_z = bound(wm1_z, org.z, wm2_z);
+                               v.x = bound(wm1_x, org.x, wm2_x);
+                               v.y = bound(wm1_y, org.y, wm2_y);
+                               v.z = bound(wm1_z, org.z, wm2_z);
                        }
                        else
                                v = w.origin;
@@ -454,14 +454,14 @@ float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist)
                                m1 = head.origin + head.mins;
                                m2 = head.origin + head.maxs;
                                v = self.origin;
-                               v_x = bound(m1_x, v.x, m2_x);
-                               v_y = bound(m1_y, v.y, m2_y);
-                               v_z = bound(m1_z, v.z, m2_z);
+                               v.x = bound(m1_x, v.x, m2_x);
+                               v.y = bound(m1_y, v.y, m2_y);
+                               v.z = bound(m1_z, v.z, m2_z);
                        }
                        else
                                v = head.origin;
                        diff = v - self.origin;
-                       diff_z = max(0, diff.z);
+                       diff.z = max(0, diff.z);
                        if (vlen(diff) < maxdist)
                        {
                                head.wpconsidered = true;
@@ -491,9 +491,9 @@ void navigation_markroutes_checkwaypoint(entity w, entity wp, float cost2, vecto
        {
                m1 = wp.absmin;
                m2 = wp.absmax;
-               v_x = bound(m1_x, p.x, m2_x);
-               v_y = bound(m1_y, p.y, m2_y);
-               v_z = bound(m1_z, p.z, m2_z);
+               v.x = bound(m1_x, p.x, m2_x);
+               v.y = bound(m1_y, p.y, m2_y);
+               v.z = bound(m1_z, p.z, m2_z);
        }
        else
                v = wp.origin;
@@ -1034,9 +1034,9 @@ void botframe_updatedangerousobjects(float maxupdate)
                while (head)
                {
                        v = head.origin;
-                       v_x = bound(m1_x, v.x, m2_x);
-                       v_y = bound(m1_y, v.y, m2_y);
-                       v_z = bound(m1_z, v.z, m2_z);
+                       v.x = bound(m1_x, v.x, m2_x);
+                       v.y = bound(m1_y, v.y, m2_y);
+                       v.z = bound(m1_z, v.z, m2_z);
                        o = (head.absmin + head.absmax) * 0.5;
                        d = head.bot_dodgerating - vlen(o - v);
                        if (d > 0)
index 0250d4ee3489c0708887e1ff08271cfbcfa94ede..3ce236c220b02f3e739ee45c88f352bb6251aaf1 100644 (file)
@@ -177,17 +177,17 @@ void waypoint_think()
                                continue;
                        }
                        sv = e.origin;
-                       sv_x = bound(sm1_x, sv.x, sm2_x);
-                       sv_y = bound(sm1_y, sv.y, sm2_y);
-                       sv_z = bound(sm1_z, sv.z, sm2_z);
+                       sv.x = bound(sm1_x, sv.x, sm2_x);
+                       sv.y = bound(sm1_y, sv.y, sm2_y);
+                       sv.z = bound(sm1_z, sv.z, sm2_z);
                        ev = self.origin;
                        em1 = e.origin + e.mins;
                        em2 = e.origin + e.maxs;
-                       ev_x = bound(em1_x, ev.x, em2_x);
-                       ev_y = bound(em1_y, ev.y, em2_y);
-                       ev_z = bound(em1_z, ev.z, em2_z);
+                       ev.x = bound(em1_x, ev.x, em2_x);
+                       ev.y = bound(em1_y, ev.y, em2_y);
+                       ev.z = bound(em1_z, ev.z, em2_z);
                        dv = ev - sv;
-                       dv_z = 0;
+                       dv.z = 0;
                        if (vlen(dv) >= 1050) // max search distance in XY
                        {
                                ++relink_lengthculled;
index 561208f5f21b69ec088f1d8546ac46f5167fb5a4..657ec4d7fd3c0e15f6477c5a56c766b5a5effcb1 100644 (file)
@@ -127,7 +127,7 @@ void info_autoscreenshot_findtarget()
                return;
        }
        vector a = vectoangles(e.origin - self.origin);
-       a_x = -a.x; // don't ask
+       a.x = -a.x; // don't ask
        self.angles_x = a.x;
        self.angles_y = a.y;
        // we leave Rick Roll alone
@@ -444,9 +444,9 @@ float CheatCommand(float argc)
                        e.enemy.skin = 1;
                        setsize(e.enemy, '0 0 0', '0 0 0');
                        end = normalize(self.origin + self.view_ofs - e.aiment.origin);
-                       end_x = (end.x > 0) * 2 - 1;
-                       end_y = (end.y > 0) * 2 - 1;
-                       end_z = (end.z > 0) * 2 - 1;
+                       end.x = (end.x > 0) * 2 - 1;
+                       end.y = (end.y > 0) * 2 - 1;
+                       end.z = (end.z > 0) * 2 - 1;
                        if(argc == 4)
                                setorigin(e.enemy, stov(argv(3)));
                        else
index 7ec183d1a58259d02121775f0cdd44225343351b..c022172ed136a40760f47d37b62ed35e4ab323c2 100644 (file)
@@ -158,14 +158,14 @@ void CheckWaterJump()
 // check for a jump-out-of-water
        makevectors (self.angles);
        start = self.origin;
-       start_z = start.z + 8;
-       v_forward_z = 0;
+       start.z = start.z + 8;
+       v_forward.z = 0;
        normalize(v_forward);
        end = start + v_forward*24;
        traceline (start, end, true, self);
        if (trace_fraction < 1)
        {       // solid at waist
-               start_z = start.z + self.maxs.z - 8;
+               start.z = start.z + self.maxs.z - 8;
                end = start + v_forward*24;
                self.movedir = trace_plane_normal * -50;
                traceline (start, end, true, self);
@@ -422,9 +422,9 @@ void RaceCarPhysics()
        {
                vector vel_local;
 
-               vel_local_x = v_forward * self.velocity;
-               vel_local_y = v_right * self.velocity;
-               vel_local_z = v_up * self.velocity;
+               vel_local.x = v_forward * self.velocity;
+               vel_local.y = v_right * self.velocity;
+               vel_local.z = v_up * self.velocity;
 
                self.angles_x = racecar_angle(vel_local.x, vel_local.z);
                self.angles_z = racecar_angle(-vel_local.y, vel_local.z);
@@ -448,7 +448,7 @@ void RaceCarPhysics()
 
 float IsMoveInDirection(vector mv, float angle) // key mix factor
 {
-       if(mv_x == 0 && mv_y == 0)
+       if(mv.x == 0 && mv.y == 0)
                return 0; // avoid division by zero
        angle -= RAD2DEG * atan2(mv.y, mv.x);
        angle = remainder(angle, 360) / 45;
@@ -610,7 +610,7 @@ void PM_AirAccelerate(vector wishdir, float wishspeed)
                return;
 
        curvel = self.velocity;
-       curvel_z = 0;
+       curvel.z = 0;
        curspeed = vlen(curvel);
 
        if(wishspeed > curspeed * 1.01)
@@ -1084,10 +1084,10 @@ void SV_PlayerPhysics()
                // fix speedhacks :P
                wishvel = normalize(wishvel) * min(vlen(wishvel) / maxairspd, 1);
                // add the unused velocity as up component
-               wishvel_z = 0;
+               wishvel.z = 0;
 
                // if(self.BUTTON_JUMP)
-                       wishvel_z = sqrt(max(0, 1 - wishvel * wishvel));
+                       wishvel.z = sqrt(max(0, 1 - wishvel * wishvel));
 
                // it is now normalized, so...
                float a_side, a_up, a_add, a_diff;
@@ -1149,7 +1149,7 @@ void SV_PlayerPhysics()
 
                wishvel.x *= fxy;
                wishvel.y *= fxy;
-               wishvel_z = (wishvel.z - autocvar_sv_gravity) * fz + autocvar_sv_gravity;
+               wishvel.z = (wishvel.z - autocvar_sv_gravity) * fz + autocvar_sv_gravity;
 
                float fvel;
                fvel = min(1, vlen(wishvel) / best);
@@ -1194,7 +1194,7 @@ void SV_PlayerPhysics()
                }
 
                v = self.velocity;
-               v_z = 0;
+               v.z = 0;
                f = vlen(v);
                if(f > 0)
                {
@@ -1285,7 +1285,7 @@ void SV_PlayerPhysics()
                        {
                                vector curdir;
                                curdir = self.velocity;
-                               curdir_z = 0;
+                               curdir.z = 0;
                                curdir = normalize(curdir);
                                airaccel = airaccel + (autocvar_sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir));
                        }
index 800a5e6026f7ef8d6299bc0cd92d22e3942298e8..1c3332b714e46d8ebc6587055e20be3625110efb 100644 (file)
@@ -153,9 +153,9 @@ float RadarMapAtPoint_Sample(float x, float y, float w, float h, float zmin, flo
        for(i = 0; i < q; ++i)
        {
                vector v;
-               v_x = a.x + random() * b.x;
-               v_y = a.y + random() * b.y;
-               v_z = a.z + random() * b.z;
+               v.x = a.x + random() * b.x;
+               v.y = a.y + random() * b.y;
+               v.z = a.z + random() * b.z;
                traceline(v, v, MOVE_WORLDONLY, world);
                if(trace_startsolid)
                        ++c;
@@ -417,7 +417,7 @@ float RadarMap_Make(float argc)
                                case "--res": // minor alias
                                case "--resolution": { ++i; radarmapper.size_x = stof(argv(i)); ++i; radarmapper.size_y = stof(argv(i)); break; }
                                case "--qual": // minor alias
-                               case "--quality": { ++i; radarmapper.size_z = stof(argv(i)); break; }
+                               case "--quality": { ++i; radarmapper.size.z = stof(argv(i)); break; }
 
                                default:
                                        i = argc;
index 985c0eeeb19ebf55a5607943ead70fedb28c10d2..718c0e5600a9a282c09b8b7f4cf14e6e1cd456ab 100644 (file)
@@ -868,7 +868,7 @@ void GameCommand_gettaginfo(float request, float argc)
                                        print(" up = ", ftos(gettaginfo_up.x), " ", ftos(gettaginfo_up.y), " ", ftos(gettaginfo_up.z), "\n");
                                        if(argc >= 6)
                                        {
-                                               v_y = -v.y;
+                                               v.y = -v.y;
                                                localcmd(strcat(argv(4), vtos(v), argv(5), "\n"));
                                        }
                                }
@@ -1546,13 +1546,13 @@ void GameCommand_trace(float request, float argc)
                                                org = world.mins;
                                                delta = world.maxs - world.mins;
 
-                                               start_x = org.x + random() * delta.x;
-                                               start_y = org.y + random() * delta.y;
-                                               start_z = org.z + random() * delta.z;
+                                               start.x = org.x + random() * delta.x;
+                                               start.y = org.y + random() * delta.y;
+                                               start.z = org.z + random() * delta.z;
 
-                                               end_x = org.x + random() * delta.x;
-                                               end_y = org.y + random() * delta.y;
-                                               end_z = org.z + random() * delta.z;
+                                               end.x = org.x + random() * delta.x;
+                                               end.y = org.y + random() * delta.y;
+                                               end.z = org.z + random() * delta.z;
 
                                                start = stov(vtos(start));
                                                end = stov(vtos(end));
index cf2d53c72d459c5884c691947ee6b27ebdf0ed83..60476213897854d537a9107f258b479bdd854d4c 100644 (file)
@@ -1087,9 +1087,9 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                                else
                                                                        hitloc = nearest;
                                                        }
-                                                       nearest_x = targ.origin.x + targ.mins.x + random() * targ.size.x;
-                                                       nearest_y = targ.origin.y + targ.mins.y + random() * targ.size.y;
-                                                       nearest_z = targ.origin.z + targ.mins.z + random() * targ.size.z;
+                                                       nearest.x = targ.origin.x + targ.mins.x + random() * targ.size.x;
+                                                       nearest.y = targ.origin.y + targ.mins.y + random() * targ.size.y;
+                                                       nearest.z = targ.origin.z + targ.mins.z + random() * targ.size.z;
                                                }
 
                                                nearest = hitloc * (1 / max(1, hits));
index f5fd6b438baae8e121d34cc5edf040ed4f1073b7..a7cedc80710fe6710955647e3bd486dff2ffd944 100644 (file)
@@ -13,14 +13,14 @@ void setanim(entity e, vector anim, float looping, float override, float restart
        if (!anim)
                return; // no animation was given to us! We can't use this.
 
-       if (anim_x == e.animstate_startframe)
-       if (anim_y == e.animstate_numframes)
-       if (anim_z == e.animstate_framerate)
+       if (anim.x == e.animstate_startframe)
+       if (anim.y == e.animstate_numframes)
+       if (anim.z == e.animstate_framerate)
        {
                if(restart)
                {
                        if(restart > 0)
-                       if(anim_y == 1) // ZYM animation
+                       if(anim.y == 1) // ZYM animation
                                BITXOR_ASSIGN(e.effects, EF_RESTARTANIM_BIT);
                }
                else
@@ -175,7 +175,7 @@ void SUB_CalcMove_controller_think (void)
                        vector destangle;
                        destangle = delta + 2 * delta2 * phasepos;
                        destangle = vectoangles(destangle);
-                       destangle_x = -destangle.x; // flip up / down orientation
+                       destangle.x = -destangle.x; // flip up / down orientation
 
                        // take the shortest distance for the angles
                        self.owner.angles_x -= 360 * floor((self.owner.angles.x - destangle.x) / 360 + 0.5);
@@ -641,9 +641,9 @@ vector findbetterlocation (vector org, float mindist)
                if (c & 1)
                {
                        h = vec.y;
-                       vec_y = vec.x;
-                       vec_x = vec.z;
-                       vec_z = h;
+                       vec.y = vec.x;
+                       vec.x = vec.z;
+                       vec.z = h;
                }
                c = c + 1;
        }
index cc2658d6ea1518d6a9d365962197b7e8d3caa051..bbfd2fbc6a3305f1a5f47a00259f2bc76eda9afa 100644 (file)
@@ -257,31 +257,31 @@ void PieceMinsMaxs(float rot, float pc)
        // 2 = 2..3
        // 3 = 1..3
        // 4 = 1..4
-       tet_piecemins_x = floor(3.0 - sz.x * 0.5);
-       tet_piecemaxs_x = floor(2.0 + sz.x * 0.5);
-       if(sz_y == 1)
+       tet_piecemins.x = floor(3.0 - sz.x * 0.5);
+       tet_piecemaxs.x = floor(2.0 + sz.x * 0.5);
+       if(sz.y == 1)
        {
                // special case for "I"
-               tet_piecemins_y = tet_piecemaxs_y = 2;
+               tet_piecemins.y = tet_piecemaxs.y = 2;
        }
        else
        {
-               tet_piecemins_y = 1;
-               tet_piecemaxs_y = sz.y;
+               tet_piecemins.y = 1;
+               tet_piecemaxs.y = sz.y;
        }
        //printf("ce%v sz%v mi%v ma%v\n", ce, sz, tet_piecemins, tet_piecemaxs);
        if (rot == 1) // 90 degrees
        {
                t = tet_piecemins.y;
-               tet_piecemins_y = -tet_piecemins.x + ce.y + ce.x;
-               tet_piecemins_x = t - ce.y + ce.x;
+               tet_piecemins.y = -tet_piecemins.x + ce.y + ce.x;
+               tet_piecemins.x = t - ce.y + ce.x;
                t = tet_piecemaxs.y;
-               tet_piecemaxs_y = -tet_piecemaxs.x + ce.y + ce.x;
-               tet_piecemaxs_x = t - ce.y + ce.x;
+               tet_piecemaxs.y = -tet_piecemaxs.x + ce.y + ce.x;
+               tet_piecemaxs.x = t - ce.y + ce.x;
                // swap mins_y, maxs_y
                t = tet_piecemins.y;
-               tet_piecemins_y = tet_piecemaxs.y;
-               tet_piecemaxs_y = t;
+               tet_piecemins.y = tet_piecemaxs.y;
+               tet_piecemaxs.y = t;
                // TODO OPTIMIZE
        }
        else if (rot == 2)//180
@@ -293,15 +293,15 @@ void PieceMinsMaxs(float rot, float pc)
        else if (rot == 3) // 270
        {
                t = tet_piecemins.y;
-               tet_piecemins_y = tet_piecemins.x - ce.x + ce.y;
-               tet_piecemins_x = -t + ce.x + ce.y;
+               tet_piecemins.y = tet_piecemins.x - ce.x + ce.y;
+               tet_piecemins.x = -t + ce.x + ce.y;
                t = tet_piecemaxs.y;
-               tet_piecemaxs_y = tet_piecemaxs.x - ce.x + ce.y;
-               tet_piecemaxs_x = -t + ce.x + ce.y;
+               tet_piecemaxs.y = tet_piecemaxs.x - ce.x + ce.y;
+               tet_piecemaxs.x = -t + ce.x + ce.y;
                // swap mins_x, maxs_x
                t = tet_piecemins.x;
-               tet_piecemins_x = tet_piecemaxs.x;
-               tet_piecemaxs_x = t;
+               tet_piecemins.x = tet_piecemaxs.x;
+               tet_piecemaxs.x = t;
                // TODO OPTIMIZE
        }
 #ifdef VERIFY
@@ -319,10 +319,10 @@ void PieceMinsMaxs(float rot, float pc)
                for(j = 1; j <= 4; ++j)
                        if(PieceMetric(i, j, rot, pc))
                        {
-                               realmins_x = min(realmins.x, i);
-                               realmins_y = min(realmins.y, j);
-                               realmaxs_x = max(realmaxs.x, i);
-                               realmaxs_y = max(realmaxs.y, j);
+                               realmins.x = min(realmins.x, i);
+                               realmins.y = min(realmins.y, j);
+                               realmaxs.x = max(realmaxs.x, i);
+                               realmaxs.y = max(realmaxs.y, j);
                        }
        if(realmins != tet_piecemins || realmaxs != tet_piecemaxs)
                error(sprintf("incorrect mins/maxs: %v %v in %d rot %d mins %v maxs %v\n", realmins, realmaxs, rot, pc, tet_piecemins, tet_piecemaxs));
@@ -1008,33 +1008,33 @@ void HandleGame(float keyss)
        nudge = 0;
        if (keyss & TETKEY_RIGHT)
        {
-               check_pos_x = check_pos.x + 1;
+               check_pos.x = check_pos.x + 1;
                tetsnd("tetmove");
        }
        else if (keyss & TETKEY_LEFT)
        {
-               check_pos_x = check_pos.x - 1;
+               check_pos.x = check_pos.x - 1;
                tetsnd("tetmove");
        }
        else if (keyss & TETKEY_ROTRIGHT)
        {
-               check_pos_z = check_pos.z + 1;
+               check_pos.z = check_pos.z + 1;
                piece_data = PieceShape(self.piece_type);
                nudge = 1;
                tetsnd("tetrot");
        }
        else if (keyss & TETKEY_ROTLEFT)
        {
-               check_pos_z = check_pos.z - 1;
+               check_pos.z = check_pos.z - 1;
                piece_data = PieceShape(self.piece_type);
                nudge = 1;
                tetsnd("tetrot");
        }
        // bounds check
        if (check_pos.z > 3)
-               check_pos_z = 0;
+               check_pos.z = 0;
        else if (check_pos.z < 0)
-               check_pos_z = 3;
+               check_pos.z = 3;
 
        // reality check
        if (CheckMetrics(self.piece_type, check_pos.x, check_pos.y, check_pos.z))
@@ -1070,12 +1070,12 @@ void HandleGame(float keyss)
        }
        else if (keyss & TETKEY_DOWN)
        {
-               check_pos_y = check_pos.y + 1;
+               check_pos.y = check_pos.y + 1;
                self.tet_autodown = time + 2 / (1 + Tetris_Level());
        }
        else if (self.tet_autodown < time)
        {
-               check_pos_y = check_pos.y + 1;
+               check_pos.y = check_pos.y + 1;
                self.tet_autodown = time + 2 / (1 + Tetris_Level());
        }
        if (CheckMetrics(self.piece_type, check_pos.x, check_pos.y, check_pos.z))
index e2a3ceaaf6038d14cb254bdbc7847ddad31c0a6c..9bb1e06e7affc73015e5a8b34bbf0340a6bc004a 100644 (file)
@@ -1091,7 +1091,7 @@ void misc_laser_aim()
                else
                {
                        a = vectoangles(self.enemy.origin - self.origin);
-                       a_x = -a.x;
+                       a.x = -a.x;
                        if(a != self.mangle)
                        {
                                self.mangle = a;
index a7ba7314da28dbca412ea4727947e66ac9e73312..7196b94f0a9184cc38093d7799e83aaf33411809 100644 (file)
@@ -511,9 +511,9 @@ vector randompos(vector m1, vector m2)
 {
     vector v;
     m2 = m2 - m1;
-    v_x = m2_x * random() + m1_x;
-    v_y = m2_y * random() + m1_y;
-    v_z = m2_z * random() + m1_z;
+    v.x = m2_x * random() + m1_x;
+    v.y = m2_y * random() + m1_y;
+    v.z = m2_z * random() + m1_z;
     return  v;
 }
 
@@ -1299,9 +1299,9 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
 
     for (i = 0; i < attempts; ++i)
     {
-        start_x = org.x + random() * delta.x;
-        start_y = org.y + random() * delta.y;
-        start_z = org.z + random() * delta.z;
+        start.x = org.x + random() * delta.x;
+        start.y = org.y + random() * delta.y;
+        start.z = org.z + random() * delta.z;
 
         // rule 1: start inside world bounds, and outside
         // solid, and don't start from somewhere where you can
@@ -1358,9 +1358,9 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
        }
 
         // find a random vector to "look at"
-        end_x = org.x + random() * delta.x;
-        end_y = org.y + random() * delta.y;
-        end_z = org.z + random() * delta.z;
+        end.x = org.x + random() * delta.x;
+        end.y = org.y + random() * delta.y;
+        end.z = org.z + random() * delta.z;
         end = start + normalize(end - start) * vlen(delta);
 
         // rule 4: start TO end must not be too short
@@ -1414,14 +1414,14 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter
                        break;
 
                case 4: // left
-                       vecs_y = -vecs.y;
+                       vecs.y = -vecs.y;
                        break;
 
                case 1:
                        if(allowcenter) // 2: allow center handedness
                        {
                                // center
-                               vecs_y = 0;
+                               vecs.y = 0;
                                vecs.z -= 2;
                        }
                        else
@@ -1434,13 +1434,13 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter
                        if(allowcenter) // 2: allow center handedness
                        {
                                // center
-                               vecs_y = 0;
+                               vecs.y = 0;
                                vecs.z -= 2;
                        }
                        else
                        {
                                // left
-                               vecs_y = -vecs.y;
+                               vecs.y = -vecs.y;
                        }
                        break;
        }
@@ -1457,28 +1457,28 @@ vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float
                if (visual)
                {
                        if (autocvar_g_shootfromclient) { vecs = shotorg_adjustfromclient(vecs, y_is_right, (autocvar_g_shootfromclient >= 2), algn); }
-                       else { vecs_y = 0; vecs.z -= 2; }
+                       else { vecs.y = 0; vecs.z -= 2; }
                }
                else
                {
-                       vecs_y = 0;
-                       vecs_z = 0;
+                       vecs.y = 0;
+                       vecs.z = 0;
                }
        }
        else if (autocvar_g_shootfromcenter)
        {
-               vecs_y = 0;
+               vecs.y = 0;
                vecs.z -= 2;
        }
        else if ((s = autocvar_g_shootfromfixedorigin) != "")
        {
                v = stov(s);
                if (y_is_right)
-                       v_y = -v.y;
+                       v.y = -v.y;
                if (v.x != 0)
-                       vecs_x = v.x;
-               vecs_y = v.y;
-               vecs_z = v.z;
+                       vecs.x = v.x;
+               vecs.y = v.y;
+               vecs.z = v.z;
        }
        else if (autocvar_g_shootfromclient)
        {
@@ -1516,12 +1516,12 @@ void attach_sameorigin(entity e, entity to, string tag)
     fixedmakevectors(e.angles);
 
     // untransform forward, up!
-    e_forward_x = v_forward * t_forward;
-    e_forward_y = v_forward * t_left;
-    e_forward_z = v_forward * t_up;
-    e_up_x = v_up * t_forward;
-    e_up_y = v_up * t_left;
-    e_up_z = v_up * t_up;
+    e_forward.x = v_forward * t_forward;
+    e_forward.y = v_forward * t_left;
+    e_forward.z = v_forward * t_up;
+    e_up.x = v_up * t_forward;
+    e_up.y = v_up * t_left;
+    e_up.z = v_up * t_up;
 
     e.angles = fixedvectoangles2(e_forward, e_up);
     if (substring(e.model, 0, 1) == "*") // bmodels have their own rules
index 29137c3d32c96beb9caf3e848d222e34df2356af..994849f5572cfa712148705297c363cf48cbf079 100644 (file)
@@ -186,7 +186,7 @@ void movelib_groundalign4point(float spring_length, float spring_up, float blend
 {
     vector a, b, c, d, e, r, push_angle, ahead, side;
 
-    push_angle_y = 0;
+    push_angle.y = 0;
     r = (self.absmax + self.absmin) * 0.5 + (v_up * spring_up);
     e = v_up * spring_length;
 
@@ -200,29 +200,29 @@ void movelib_groundalign4point(float spring_length, float spring_up, float blend
     d = r - ahead - side;
 
     traceline(a, a - e,MOVE_NORMAL,self);
-    a_z =  (1 - trace_fraction);
+    a.z =  (1 - trace_fraction);
     r = trace_endpos;
 
     traceline(b, b - e,MOVE_NORMAL,self);
-    b_z =  (1 - trace_fraction);
+    b.z =  (1 - trace_fraction);
     r += trace_endpos;
 
     traceline(c, c - e,MOVE_NORMAL,self);
-    c_z =  (1 - trace_fraction);
+    c.z =  (1 - trace_fraction);
     r += trace_endpos;
 
     traceline(d, d - e,MOVE_NORMAL,self);
-    d_z =  (1 - trace_fraction);
+    d.z =  (1 - trace_fraction);
     r += trace_endpos;
 
-    a_x = r.z;
+    a.x = r.z;
     r = self.origin;
-    r_z = r.z;
+    r.z = r.z;
 
-    push_angle_x = (a.z - c.z) * _max;
+    push_angle.x = (a.z - c.z) * _max;
     push_angle.x += (b.z - d.z) * _max;
 
-    push_angle_z = (b.z - a.z) * _max;
+    push_angle.z = (b.z - a.z) * _max;
     push_angle.z += (d.z - c.z) * _max;
 
     //self.angles_x += push_angle_x * 0.95;
index 896b6659c6dfb2dc342b66c7daf2ab207312c529..2e6eb4ff732533e927fc4359459ea5fec9f940f6 100644 (file)
@@ -1581,7 +1581,7 @@ void havocbot_role_ctf_middle()
                vector org;
 
                org = havocbot_ctf_middlepoint;
-               org_z = self.origin.z;
+               org.z = self.origin.z;
 
                self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
                navigation_goalrating_start();
index 1020724716aa1c72554c5d28eea7ddf272832084..1c1ce481b787275dc96dceddf2acf86f5bcaa0d8 100644 (file)
@@ -59,11 +59,11 @@ MUTATOR_HOOKFUNCTION(cts_PlayerPhysics)
        // ensure nothing EVIL is being done (i.e. div0_evade)
        // this hinders joystick users though
        // but it still gives SOME analog control
-       wishvel_x = fabs(self.movement.x);
-       wishvel_y = fabs(self.movement.y);
+       wishvel.x = fabs(self.movement.x);
+       wishvel.y = fabs(self.movement.y);
        if(wishvel.x != 0 && wishvel.y != 0 && wishvel.x != wishvel.y)
        {
-               wishvel_z = 0;
+               wishvel.z = 0;
                wishspeed = vlen(wishvel);
                if(wishvel.x >= 2 * wishvel.y)
                {
index 3cb26f1311be9c80ca61336abe531ab7f09bdfae..244b9f0e50e8c927dcc15c976a1a57f05264a366 100644 (file)
@@ -66,11 +66,11 @@ MUTATOR_HOOKFUNCTION(race_PlayerPhysics)
        // ensure nothing EVIL is being done (i.e. div0_evade)
        // this hinders joystick users though
        // but it still gives SOME analog control
-       wishvel_x = fabs(self.movement.x);
-       wishvel_y = fabs(self.movement.y);
+       wishvel.x = fabs(self.movement.x);
+       wishvel.y = fabs(self.movement.y);
        if(wishvel.x != 0 && wishvel.y != 0 && wishvel.x != wishvel.y)
        {
-               wishvel_z = 0;
+               wishvel.z = 0;
                wishspeed = vlen(wishvel);
                if(wishvel.x >= 2 * wishvel.y)
                {
index 30362448d3a02707dd582c92d33148b475661a48..21dd71f98b5dfc74302c10c01510b37073ee2fb3 100644 (file)
@@ -32,7 +32,7 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerThink)
 
                // calculate player movement (in 2 dimensions only, so jumping on one spot doesn't count as movement)
                dist = self.prevorigin - self.origin;
-               dist_z = 0;
+               dist.z = 0;
                self.campcheck_traveled_distance += fabs(vlen(dist));
 
                if((autocvar_g_campaign && !campaign_bots_may_start) || (time < game_starttime) || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
index c2db56b946d055bd6d328210cace90001ddcd570..ad52d3e2919f29a3563927a4c900ca401f35ee40 100644 (file)
@@ -186,7 +186,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_FORWARD) || frozen_no_doubletap) {
                        if ((time - self.last_FORWARD_KEY_time) < self.cvar_cl_dodging_timeout) {
-                               tap_direction_x = 1.0;
+                               tap_direction.x = 1.0;
                                dodge_detected = 1;
                        }
                        self.last_FORWARD_KEY_time = time;
@@ -196,7 +196,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
        if (self.movement.x < 0) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_BACKWARD) || frozen_no_doubletap) {
-                       tap_direction_x = -1.0;
+                       tap_direction.x = -1.0;
                        if ((time - self.last_BACKWARD_KEY_time) < self.cvar_cl_dodging_timeout)        {
                                dodge_detected = 1;
                        }
@@ -207,7 +207,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
        if (self.movement.y > 0) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_RIGHT) || frozen_no_doubletap) {
-                       tap_direction_y = 1.0;
+                       tap_direction.y = 1.0;
                        if ((time - self.last_RIGHT_KEY_time) < self.cvar_cl_dodging_timeout)   {
                                dodge_detected = 1;
                        }
@@ -218,7 +218,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
        if (self.movement.y < 0) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_LEFT) || frozen_no_doubletap) {
-                       tap_direction_y = -1.0;
+                       tap_direction.y = -1.0;
                        if ((time - self.last_LEFT_KEY_time) < self.cvar_cl_dodging_timeout)    {
                                dodge_detected = 1;
                        }
index 88e83a960b02a89093429d6eebc1eed675bde25d..41dc285d233d95200f06f1cde96abd0f58281158 100644 (file)
@@ -129,9 +129,9 @@ void nade_napalm_ball()
        proj.damageforcescale = autocvar_g_nades_napalm_ball_damageforcescale;
        proj.effects = EF_LOWPRECISION | EF_FLAME;
 
-       kick_x =(random() - 0.5) * 2 * autocvar_g_nades_napalm_ball_spread;
-       kick_y = (random() - 0.5) * 2 * autocvar_g_nades_napalm_ball_spread;
-       kick_z = (random()/2+0.5) * autocvar_g_nades_napalm_ball_spread;
+       kick.x =(random() - 0.5) * 2 * autocvar_g_nades_napalm_ball_spread;
+       kick.y = (random() - 0.5) * 2 * autocvar_g_nades_napalm_ball_spread;
+       kick.z = (random()/2+0.5) * autocvar_g_nades_napalm_ball_spread;
        proj.velocity = kick;
 
        proj.pushltime = time + autocvar_g_nades_napalm_ball_lifetime;
@@ -268,9 +268,9 @@ void nade_ice_think()
        float randomw;
        randomw = random()*M_PI*2;
        vector randomp;
-       randomp_x = randomr*cos(randomw);
-       randomp_y = randomr*sin(randomw);
-       randomp_z = 1;
+       randomp.x = randomr*cos(randomw);
+       randomp.y = randomr*sin(randomw);
+       randomp.z = 1;
        pointparticles(particleeffectnum("electro_muzzleflash"), self.origin + randomp, '0 0 0', 1);
 
        if(time >= self.nade_special_time)
index 95737a45d5e50ff59f33a6aeae80592685c1a5e2..2f66441f7a00111eaca7ab8b4795ca06c15a65f1 100644 (file)
@@ -117,9 +117,9 @@ vector vsnap(vector point,float fsize)
 {
     vector vret;
 
-    vret_x = rint(point.x / fsize) * fsize;
-    vret_y = rint(point.y / fsize) * fsize;
-    vret_z = ceil(point.z / fsize) * fsize;
+    vret.x = rint(point.x / fsize) * fsize;
+    vret.y = rint(point.y / fsize) * fsize;
+    vret.z = ceil(point.z / fsize) * fsize;
 
     return vret;
 }
@@ -220,8 +220,8 @@ vector pathlib_wateroutnode(vector start,vector end,float doedge)
 
     pathlib_movenode_goodnode = 0;
 
-    end_x = fsnap(end.x, pathlib_gridsize);
-    end_y = fsnap(end.y, pathlib_gridsize);
+    end.x = fsnap(end.x, pathlib_gridsize);
+    end.y = fsnap(end.y, pathlib_gridsize);
 
     traceline(end + ('0 0 0.25' * pathlib_gridsize),end - ('0 0 1' * pathlib_gridsize),MOVE_WORLDONLY,self);
     end = trace_endpos;
@@ -255,8 +255,8 @@ vector pathlib_swimnode(vector start,vector end,float doedge)
     if(pointcontents(start) != CONTENT_WATER)
         return end;
 
-    end_x = fsnap(end.x, pathlib_gridsize);
-    end_y = fsnap(end.y, pathlib_gridsize);
+    end.x = fsnap(end.x, pathlib_gridsize);
+    end.y = fsnap(end.y, pathlib_gridsize);
 
     if(pointcontents(end) == CONTENT_EMPTY)
         return pathlib_wateroutnode( start, end);
@@ -272,8 +272,8 @@ vector pathlib_flynode(vector start,vector end)
 {
     pathlib_movenode_goodnode = 0;
 
-    end_x = fsnap(end.x, pathlib_gridsize);
-    end_y = fsnap(end.y, pathlib_gridsize);
+    end.x = fsnap(end.x, pathlib_gridsize);
+    end.y = fsnap(end.y, pathlib_gridsize);
 
     tracebox(start, walknode_boxmin,walknode_boxmax, end, MOVE_WORLDONLY, self);
     if(trace_fraction == 1)
@@ -291,8 +291,8 @@ vector pathlib_walknode(vector start,vector end,float doedge)
 
     s   = start;
     e   = end;
-    e_z = 0;
-    s_z = 0;
+    e.z = 0;
+    s.z = 0;
     direction  = normalize(s - e);
 
     distance    = vlen(start - end);
@@ -340,8 +340,8 @@ vector pathlib_walknode(vector start,vector end,float doedge)
 
     point = last_point + direction * walknode_stepsize * laststep;
 
-    point_x = fsnap(point.x, pathlib_gridsize);
-    point_y = fsnap(point.y, pathlib_gridsize);
+    point.x = fsnap(point.x, pathlib_gridsize);
+    point.y = fsnap(point.y, pathlib_gridsize);
 
     s = point + walknode_stepup;
     e = point - walknode_maxdrop;
@@ -782,9 +782,9 @@ float pathlib_expandnode_box(entity node, vector start, vector goal)
 {
     vector v;
 
-    for(v_z = node.origin.z - pathlib_gridsize; v.z <= node.origin.z + pathlib_gridsize; v.z += pathlib_gridsize)
-    for(v_y = node.origin.y - pathlib_gridsize; v.y <= node.origin.y + pathlib_gridsize; v.y += pathlib_gridsize)
-    for(v_x = node.origin.x - pathlib_gridsize; v.x <= node.origin.x + pathlib_gridsize; v.x += pathlib_gridsize)
+    for(v.z = node.origin.z - pathlib_gridsize; v.z <= node.origin.z + pathlib_gridsize; v.z += pathlib_gridsize)
+    for(v.y = node.origin.y - pathlib_gridsize; v.y <= node.origin.y + pathlib_gridsize; v.y += pathlib_gridsize)
+    for(v.x = node.origin.x - pathlib_gridsize; v.x <= node.origin.x + pathlib_gridsize; v.x += pathlib_gridsize)
     {
         if(vlen(v - node.origin))
             pathlib_makenode(node,start,v,goal,pathlib_movecost);
@@ -934,11 +934,11 @@ entity pathlib_astar(vector from,vector to)
     walknode_stepup   = '0 0 1' * walknode_stepsize;
     walknode_maxdrop  = '0 0 3' * walknode_stepsize;
 
-    from_x = fsnap(from.x,pathlib_gridsize);
-    from_y = fsnap(from.y,pathlib_gridsize);
+    from.x = fsnap(from.x,pathlib_gridsize);
+    from.y = fsnap(from.y,pathlib_gridsize);
 
-    to_x = fsnap(to.x,pathlib_gridsize);
-    to_y = fsnap(to.y,pathlib_gridsize);
+    to.x = fsnap(to.x,pathlib_gridsize);
+    to.y = fsnap(to.y,pathlib_gridsize);
 
     dprint("AStar init. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n");
     path = pathlib_mknode(from,world);
index 70d6de7a8ef084cfbc4dae2f07b0c46adba0c53f..4427f9b7fd03f432fc23a6c9d370ebb36629d672 100644 (file)
@@ -220,9 +220,9 @@ float pathlib_expandnode_box(entity node, vector start, vector goal)
 {
     vector v;
 
-    for(v_z = node.origin.z - pathlib_gridsize; v.z <= node.origin.z + pathlib_gridsize; v.z += pathlib_gridsize)
-    for(v_y = node.origin.y - pathlib_gridsize; v.y <= node.origin.y + pathlib_gridsize; v.y += pathlib_gridsize)
-    for(v_x = node.origin.x - pathlib_gridsize; v.x <= node.origin.x + pathlib_gridsize; v.x += pathlib_gridsize)
+    for(v.z = node.origin.z - pathlib_gridsize; v.z <= node.origin.z + pathlib_gridsize; v.z += pathlib_gridsize)
+    for(v.y = node.origin.y - pathlib_gridsize; v.y <= node.origin.y + pathlib_gridsize; v.y += pathlib_gridsize)
+    for(v.x = node.origin.x - pathlib_gridsize; v.x <= node.origin.x + pathlib_gridsize; v.x += pathlib_gridsize)
     {
         //if(vlen(v - node.origin))
             pathlib_makenode(node,start,v,goal,pathlib_movecost);
index cd586b3cdf93b911a6b85bd52847e587834a5646..5fef3251f64b568680f124c442a85572d2ee35c0 100644 (file)
@@ -443,12 +443,12 @@ entity pathlib_astar(vector from,vector to)
     //movenode_maxdrop  = '0 0 512';
     movenode_boxup    = '0 0 72';
 
-    from_x = fsnap(from.x, pathlib_gridsize);
-    from_y = fsnap(from.y, pathlib_gridsize);
+    from.x = fsnap(from.x, pathlib_gridsize);
+    from.y = fsnap(from.y, pathlib_gridsize);
     //from_z += 32;
 
-    to_x = fsnap(to.x, pathlib_gridsize);
-    to_y = fsnap(to.y, pathlib_gridsize);
+    to.x = fsnap(to.x, pathlib_gridsize);
+    to.y = fsnap(to.y, pathlib_gridsize);
     //to_z += 32;
 
     dprint("AStar init\n");
index 2027741960dd0fcd24382e9250220699c86ac7e0..1da6fe16718065a64a0f69ef81767a496399bbaa 100644 (file)
@@ -4,8 +4,8 @@ vector pathlib_wateroutnode(vector start,vector end, float doedge)
 
     pathlib_movenode_goodnode = 0;
 
-    end_x = fsnap(end.x, pathlib_gridsize);
-    end_y = fsnap(end.y, pathlib_gridsize);
+    end.x = fsnap(end.x, pathlib_gridsize);
+    end.y = fsnap(end.y, pathlib_gridsize);
 
     traceline(end + ('0 0 0.25' * pathlib_gridsize),end - ('0 0 1' * pathlib_gridsize),MOVE_WORLDONLY,self);
     end = trace_endpos;
@@ -39,8 +39,8 @@ vector pathlib_swimnode(vector start,vector end, float doedge)
     if(pointcontents(start) != CONTENT_WATER)
         return end;
 
-    end_x = fsnap(end.x, pathlib_gridsize);
-    end_y = fsnap(end.y, pathlib_gridsize);
+    end.x = fsnap(end.x, pathlib_gridsize);
+    end.y = fsnap(end.y, pathlib_gridsize);
 
     if(pointcontents(end) == CONTENT_EMPTY)
         return pathlib_wateroutnode( start, end, doedge);
@@ -56,8 +56,8 @@ vector pathlib_flynode(vector start,vector end, float doedge)
 {
     pathlib_movenode_goodnode = 0;
 
-    end_x = fsnap(end.x, pathlib_gridsize);
-    end_y = fsnap(end.y, pathlib_gridsize);
+    end.x = fsnap(end.x, pathlib_gridsize);
+    end.y = fsnap(end.y, pathlib_gridsize);
 
     tracebox(start, movenode_boxmin,movenode_boxmax, end, MOVE_WORLDONLY, self);
     if(trace_fraction == 1)
@@ -84,10 +84,10 @@ vector pathlib_walknode(vector start,vector end,float doedge)
 
     pathlib_movenode_goodnode = 0;
 
-    end_x = fsnap(end.x,pathlib_gridsize);
-    end_y = fsnap(end.y,pathlib_gridsize);
-    start_x = fsnap(start.x,pathlib_gridsize);
-    start_y = fsnap(start.y,pathlib_gridsize);
+    end.x = fsnap(end.x,pathlib_gridsize);
+    end.y = fsnap(end.y,pathlib_gridsize);
+    start.x = fsnap(start.x,pathlib_gridsize);
+    start.y = fsnap(start.y,pathlib_gridsize);
 
     // Find the floor
     traceline(start + movenode_stepup, start - movenode_maxdrop, MOVE_WORLDONLY, self);
@@ -128,8 +128,8 @@ vector pathlib_walknode(vector start,vector end,float doedge)
     }
 
     point = last_point + (direction * movenode_stepsize);
-    point_x = fsnap(point.x,pathlib_gridsize);
-    point_y = fsnap(point.y,pathlib_gridsize);
+    point.x = fsnap(point.x,pathlib_gridsize);
+    point.y = fsnap(point.y,pathlib_gridsize);
 
     //dprint("end_x:  ",ftos(end_x),  "  end_y:  ",ftos(end_y),"\n");
     //dprint("point_x:",ftos(point_x),"  point_y:",ftos(point_y),"\n\n");
index 738ceb2ce8003ed2a66e84fdd0bd77de776bee6a..7bdc70877420a38d60bd7ce7b3da04e99abe4c28 100644 (file)
@@ -7,9 +7,9 @@ vector vsnap(vector point,float fsize)
 {
     vector vret;
 
-    vret_x = rint(point.x / fsize) * fsize;
-    vret_y = rint(point.y / fsize) * fsize;
-    vret_z = ceil(point.z / fsize) * fsize;
+    vret.x = rint(point.x / fsize) * fsize;
+    vret.y = rint(point.y / fsize) * fsize;
+    vret.z = ceil(point.z / fsize) * fsize;
 
     return vret;
 }
@@ -68,8 +68,8 @@ entity pathlib_nodeatpoint(vector where)
 
     ++pathlib_searched_cnt;
 
-    where_x = fsnap(where.x,pathlib_gridsize);
-    where_y = fsnap(where.y,pathlib_gridsize);
+    where.x = fsnap(where.x,pathlib_gridsize);
+    where.y = fsnap(where.y,pathlib_gridsize);
 
     node = findradius(where,pathlib_gridsize * 0.5);
     while(node)
index 6aeb4f0f306151ececb8ee29b371f8775fe2f39b..53c77ecceefc089e6215e93fd2d9bc771205bc3a 100644 (file)
@@ -33,9 +33,9 @@ float PlayerEdgeDistance(entity p, vector v)
 {
        vector vbest;
 
-       if(v.x < 0) vbest_x = p.mins.x; else vbest_x = p.maxs.x;
-       if(v.y < 0) vbest_y = p.mins.y; else vbest_y = p.maxs.y;
-       if(v.z < 0) vbest_z = p.mins.z; else vbest_z = p.maxs.z;
+       if(v.x < 0) vbest.x = p.mins.x; else vbest.x = p.maxs.x;
+       if(v.y < 0) vbest.y = p.mins.y; else vbest.y = p.maxs.y;
+       if(v.z < 0) vbest.z = p.mins.z; else vbest.z = p.maxs.z;
 
        return vbest * v;
 }
@@ -56,7 +56,7 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
 
        // PLAYERS use different math
 #ifndef POSITIVE_PITCH_IS_DOWN
-       ang_x = -ang.x;
+       ang.x = -ang.x;
 #endif
 
        //print("reference: ", vtos(AnglesTransform_ApplyToVAngles(transform, ang)), "\n");
@@ -86,7 +86,7 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
                ang = fixedvectoangles(new_forward); // this still gets us a nice pitch value...
                if(new_up * new_yawforward < 0)
                        new_up = -1 * new_up;
-               ang_y = vectoyaw(new_up); // this vector is the yaw we want
+               ang.y = vectoyaw(new_up); // this vector is the yaw we want
                //print("UP/DOWN path: ", vtos(ang), "\n");
        }
        else
@@ -97,9 +97,9 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
        }
 
 #ifndef POSITIVE_PITCH_IS_DOWN
-       ang_x = -ang.x;
+       ang.x = -ang.x;
 #endif
-       ang_z = vangle.z;
+       ang.z = vangle.z;
        return ang;
 }
 
index 6ece837e83f23960e6bd847e65d89cfc10967beb..0b5d0ee8c7b4d14429b8bffae9526dc2f9dfef25 100644 (file)
@@ -21,26 +21,26 @@ vector ScoreField_Compare(entity t1, entity t2, .float field, float fieldflags,
        if(t1.field == t2.field)
                return previous;
 
-       previous_y = fieldflags & SFL_SORT_PRIO_MASK;
+       previous.y = fieldflags & SFL_SORT_PRIO_MASK;
 
        if(fieldflags & SFL_ZERO_IS_WORST)
        {
                if(t1.field == 0)
                {
-                       previous_x = -1;
+                       previous.x = -1;
                        return previous;
                }
                else if(t2.field == 0)
                {
-                       previous_x = +1;
+                       previous.x = +1;
                        return previous;
                }
        }
 
        if(fieldflags & SFL_LOWER_IS_BETTER)
-               previous_x = (t2.field - t1.field);
+               previous.x = (t2.field - t1.field);
        else
-               previous_x = (t1.field - t2.field);
+               previous.x = (t1.field - t2.field);
 
        return previous;
 }
@@ -138,8 +138,8 @@ float TeamScore_Compare(entity t1, entity t2, float strict)
                result = ScoreField_Compare(t1, t2, f, teamscores_flags[i], result, strict);
        }
 
-       if (result_x == 0 && strict)
-               result_x = t1.team - t2.team;
+       if (result.x == 0 && strict)
+               result.x = t1.team - t2.team;
 
        return result.x;
 }
@@ -375,8 +375,8 @@ float PlayerScore_Compare(entity t1, entity t2, float strict)
                result = ScoreField_Compare(t1, t2, f, scores_flags[i], result, strict);
        }
 
-       if (result_x == 0 && strict)
-               result_x = num_for_edict(t1.owner) - num_for_edict(t2.owner);
+       if (result.x == 0 && strict)
+               result.x = num_for_edict(t1.owner) - num_for_edict(t2.owner);
 
        return result.x;
 }
index 4391c17821dfd866ddfeddf11c4c46d847c299be..ec76dfef2cda72354df3d1557fdd30e71f19dd7b 100644 (file)
@@ -221,8 +221,8 @@ vector steerlib_flock2d(float _radius, float standoff,float separation_force,flo
         flock_member = flock_member.chain;
     }
 
-    push_z = 0;
-    pull_z = 0;
+    push.z = 0;
+    pull.z = 0;
 
     return push + (pull * (1 / ccount));
 }
index 17b574d1584ef007fef730ca48bccde48cb5ceff..9e215747a1da4430cde952a0f3fe9c8203eb1bff 100644 (file)
@@ -73,9 +73,9 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
        solution = solve_quadratic(0.5 * grav, -vz, zdist); // equation "z(ti) = zdist"
        // ALWAYS solvable because jumpheight >= zdist
        if(!solution.z)
-               solution_y = solution.x; // just in case it is not solvable due to roundoff errors, assume two equal solutions at their center (this is mainly for the usual case with ht == 0)
+               solution.y = solution.x; // just in case it is not solvable due to roundoff errors, assume two equal solutions at their center (this is mainly for the usual case with ht == 0)
        if(zdist == 0)
-               solution_x = solution.y; // solution_x is 0 in this case, so don't use it, but rather use solution_y (which will be sqrt(0.5 * jumpheight / grav), actually)
+               solution.x = solution.y; // solution_x is 0 in this case, so don't use it, but rather use solution_y (which will be sqrt(0.5 * jumpheight / grav), actually)
 
        if(zdist < 0)
        {
@@ -244,7 +244,7 @@ void trigger_push_findtarget()
 
        // first calculate a typical start point for the jump
        org = (self.absmin + self.absmax) * 0.5;
-       org_z = self.absmax.z - PL_MIN_z;
+       org.z = self.absmax.z - PL_MIN_z;
 
        if (self.target)
        {
index fb46442352a9aaa2a0c86bd91153f2ddbe677755..6a64420c612dc395bb62981a04be85d0c2057f88 100644 (file)
@@ -56,19 +56,19 @@ void plat_spawn_inside_trigger()
 
        tmin = self.absmin + '25 25 0';
        tmax = self.absmax - '25 25 -8';
-       tmin_z = tmax.z - (self.pos1_z - self.pos2_z + 8);
+       tmin.z = tmax.z - (self.pos1_z - self.pos2_z + 8);
        if (self.spawnflags & PLAT_LOW_TRIGGER)
-               tmax_z = tmin.z + 8;
+               tmax.z = tmin.z + 8;
 
        if (self.size.x <= 50)
        {
-               tmin_x = (self.mins.x + self.maxs.x) / 2;
-               tmax_x = tmin.x + 1;
+               tmin.x = (self.mins.x + self.maxs.x) / 2;
+               tmax.x = tmin.x + 1;
        }
        if (self.size.y <= 50)
        {
-               tmin_y = (self.mins.y + self.maxs.y) / 2;
-               tmax_y = tmin.y + 1;
+               tmin.y = (self.mins.y + self.maxs.y) / 2;
+               tmax.y = tmin.y + 1;
        }
 
        if(tmin.x < tmax.x)
@@ -328,7 +328,7 @@ void train_wait()
                else // linear movement
                        ang = targ.origin - (self.origin - self.view_ofs); // use the origin of the next path_corner
                ang = vectoangles(ang);
-               ang_x = -ang.x; // flip up / down orientation
+               ang.x = -ang.x; // flip up / down orientation
 
                if(self.wait > 0) // slow turning
                        SUB_CalcAngleMove(ang, TSPEED_TIME, self.ltime - time + self.wait, train_wait);
@@ -1408,17 +1408,17 @@ void LinkDoors()
                if((t.message != "") && (self.message == ""))
                        self.message = t.message;
                if (t.absmin.x < cmins.x)
-                       cmins_x = t.absmin.x;
+                       cmins.x = t.absmin.x;
                if (t.absmin.y < cmins.y)
-                       cmins_y = t.absmin.y;
+                       cmins.y = t.absmin.y;
                if (t.absmin.z < cmins.z)
-                       cmins_z = t.absmin.z;
+                       cmins.z = t.absmin.z;
                if (t.absmax.x > cmaxs.x)
-                       cmaxs_x = t.absmax.x;
+                       cmaxs.x = t.absmax.x;
                if (t.absmax.y > cmaxs.y)
-                       cmaxs_y = t.absmax.y;
+                       cmaxs.y = t.absmax.y;
                if (t.absmax.z > cmaxs.z)
-                       cmaxs_z = t.absmax.z;
+                       cmaxs.z = t.absmax.z;
                if(t.enemy == self)
                        break;
        }
@@ -1627,7 +1627,7 @@ void spawnfunc_func_door_rotating()
        else // Z
                self.movedir = '0 1 0';
 
-       if (self.angles_y ==0) self.angles_y = 90;
+       if (self.angles.y ==0) self.angles.y = 90;
 
        self.movedir = self.movedir * self.angles.y;
        self.angles = '0 0 0';
index 4b1750cd33ed219dbbf20862df839980f77b3028..4bde2db157a83035b20ada5c8b3449f19ebe8dd0 100644 (file)
@@ -12,12 +12,12 @@ void trigger_teleport_use();
        deathmax = (o) + player.maxs; \
        if(telefragmin != telefragmax) \
        { \
-               if(deathmin.x > telefragmin.x) deathmin_x = telefragmin.x; \
-               if(deathmin.y > telefragmin.y) deathmin_y = telefragmin.y; \
-               if(deathmin.z > telefragmin.z) deathmin_z = telefragmin.z; \
-               if(deathmax.x < telefragmax.x) deathmax_x = telefragmax.x; \
-               if(deathmax.y < telefragmax.y) deathmax_y = telefragmax.y; \
-               if(deathmax.z < telefragmax.z) deathmax_z = telefragmax.z; \
+               if(deathmin.x > telefragmin.x) deathmin.x = telefragmin.x; \
+               if(deathmin.y > telefragmin.y) deathmin.y = telefragmin.y; \
+               if(deathmin.z > telefragmin.z) deathmin.z = telefragmin.z; \
+               if(deathmax.x < telefragmax.x) deathmax.x = telefragmax.x; \
+               if(deathmax.y < telefragmax.y) deathmax.y = telefragmax.y; \
+               if(deathmax.z < telefragmax.z) deathmax.z = telefragmax.z; \
        } \
        deathradius = max(vlen(deathmin), vlen(deathmax)); \
        for(head = findradius(o, deathradius); head; head = head.chain) \
index 477a57e0aa7d4505a3b7295dc792f53de26dc86a..28145a2934669877af6e0b0ac054afcb952bd457 100644 (file)
@@ -48,13 +48,13 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                value = argv(i+1);
                if(key == "$")
                {
-                       data_x = -1;
-                       data_y = FIELD_STRING;
+                       data.x = -1;
+                       data.y = FIELD_STRING;
                }
                else
                {
                        data = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", key)));
-                       if(data_y == 0) // undefined field, i.e., invalid type
+                       if(data.y == 0) // undefined field, i.e., invalid type
                        {
                                print("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n");
                                continue;
@@ -232,7 +232,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                }
                else
                {
-                       if(data_y == FIELD_VECTOR)
+                       if(data.y == FIELD_VECTOR)
                                value = strreplace("'", "", value); // why?!?
                        putentityfieldstring(data.x, e, value);
                }
@@ -322,7 +322,7 @@ void initialize_field_db()
                        ft = entityfieldtype(i);
                        new = i * '1 0 0' + ft * '0 1 0' + '0 0 1';
                        prev = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", fn)));
-                       if(prev_y == 0)
+                       if(prev.y == 0)
                        {
                                db_put(TemporaryDB, strcat("/target_spawn/field/", fn), vtos(new));
                                if(fn == "target_spawn_spawnfunc")
index 849ceb37d8838c1506150c08dd1da93223e29674..fa21f1ac6613f389c1e361e1d8b86643ad058f81 100644 (file)
@@ -45,12 +45,12 @@ vector turret_stdproc_aim_generic()
                        if(self.enemy.movetype == MOVETYPE_WALK || self.enemy.movetype == MOVETYPE_TOSS || self.enemy.movetype == MOVETYPE_BOUNCE)
                        {
                                float vz;
-                               prep_z = pre_pos.z;
+                               prep.z = pre_pos.z;
                                vz = self.enemy.velocity.z;
                                for(i = 0; i < impact_time; i += sys_frametime)
                                {
                                        vz = vz - (autocvar_sv_gravity * sys_frametime);
-                                       prep_z = prep.z + vz * sys_frametime;
+                                       prep.z = prep.z + vz * sys_frametime;
                                }
                        }
                        pre_pos = prep;
index 28d2ae29cbe7dff7de2ec02f53af029ffece298b..f2b0c56ce846d596cdd486772c89faa98d3b2160 100644 (file)
@@ -387,15 +387,15 @@ void turret_stdproc_track()
 
         case TFL_TRACKTYPE_FLUIDINERTIA:
             f_tmp = self.aim_speed * self.ticrate; // dgr/sec -> dgr/tic
-            move_angle_x = bound(-self.aim_speed, move_angle.x * self.track_accel_pitch * f_tmp, self.aim_speed);
-            move_angle_y = bound(-self.aim_speed, move_angle.y * self.track_accel_rot * f_tmp, self.aim_speed);
+            move_angle.x = bound(-self.aim_speed, move_angle.x * self.track_accel_pitch * f_tmp, self.aim_speed);
+            move_angle.y = bound(-self.aim_speed, move_angle.y * self.track_accel_rot * f_tmp, self.aim_speed);
             move_angle = (self.tur_head.avelocity * self.track_blendrate) + (move_angle * (1 - self.track_blendrate));
             break;
 
         case TFL_TRACKTYPE_FLUIDPRECISE:
 
-            move_angle_y = bound(-self.aim_speed, move_angle.y, self.aim_speed);
-            move_angle_x = bound(-self.aim_speed, move_angle.x, self.aim_speed);
+            move_angle.y = bound(-self.aim_speed, move_angle.y, self.aim_speed);
+            move_angle.x = bound(-self.aim_speed, move_angle.x, self.aim_speed);
 
             break;
     }
index 78aa63c09b7703bcd7b45aee73c63041ec9344fd..787510694e9101eca0c0158564170fdf846b5d9f 100644 (file)
@@ -36,9 +36,9 @@ vector shortangle_v(vector ang1, vector ang2)
 {
     vector vtmp;
 
-    vtmp_x = shortangle_f(ang1_x,ang2_x);
-    vtmp_y = shortangle_f(ang1_y,ang2_y);
-    vtmp_z = shortangle_f(ang1_z,ang2_z);
+    vtmp.x = shortangle_f(ang1_x,ang2_x);
+    vtmp.y = shortangle_f(ang1_y,ang2_y);
+    vtmp.z = shortangle_f(ang1_z,ang2_z);
 
     return vtmp;
 }
@@ -47,8 +47,8 @@ vector shortangle_vxy(vector ang1, vector ang2)
 {
     vector vtmp = '0 0 0';
 
-    vtmp_x = shortangle_f(ang1_x,ang2_x);
-    vtmp_y = shortangle_f(ang1_y,ang2_y);
+    vtmp.x = shortangle_f(ang1_x,ang2_x);
+    vtmp.y = shortangle_f(ang1_y,ang2_y);
 
     return vtmp;
 }
index f67ae25e87ff5a1c7b182f03ee247a22b985e509..7eb1622baf102b80fd1aba8407559613c6b10bf5 100644 (file)
@@ -152,7 +152,7 @@ void ewheel_postthink()
     real_angle = shortangle_vxy(real_angle, self.tur_head.angles);
 
     self.tur_head.spawnshieldtime = fabs(real_angle.y);
-    real_angle_y = bound(-self.tur_head.aim_speed, real_angle.y, self.tur_head.aim_speed);
+    real_angle.y = bound(-self.tur_head.aim_speed, real_angle.y, self.tur_head.aim_speed);
     self.angles_y = (self.angles.y + real_angle.y);
 
     if(self.enemy)
index 68733b5b7c30998fbfc4800753149420e794bf95..9b3ae6c31d1b2a75cc5e05f00335150be11d68ee 100644 (file)
@@ -368,7 +368,7 @@ float bumb_pilot_frame()
        else if(pilot.movement.x < 0 && vang.x > -autocvar_g_vehicle_bumblebee_pitchlimit)
                ftmp = -8;
 
-       newvel_x = bound(-autocvar_g_vehicle_bumblebee_pitchlimit, newvel.x , autocvar_g_vehicle_bumblebee_pitchlimit);
+       newvel.x = bound(-autocvar_g_vehicle_bumblebee_pitchlimit, newvel.x , autocvar_g_vehicle_bumblebee_pitchlimit);
        ftmp = vang.x - bound(-autocvar_g_vehicle_bumblebee_pitchlimit, newvel.x + ftmp, autocvar_g_vehicle_bumblebee_pitchlimit);
        vehic.avelocity_x = bound(-autocvar_g_vehicle_bumblebee_pitchspeed, ftmp + vehic.avelocity.x * 0.9, autocvar_g_vehicle_bumblebee_pitchspeed);
 
index 58d1438439c01daef42c8de9c41451db23e84c13..87dfe52a7e55f2d0a8b94dadbbb4dcacca51653a 100644 (file)
@@ -102,11 +102,11 @@ void racer_align4point(float _delta)
     if(self.velocity.z > 0)
         self.velocity_z *= 1 - autocvar_g_vehicle_racer_upforcedamper * _delta;
 
-    push_vector_x =  (fl_push - bl_push);
+    push_vector.x =  (fl_push - bl_push);
     push_vector_x += (fr_push - br_push);
     push_vector_x *= 360;
 
-    push_vector_z = (fr_push - fl_push);
+    push_vector.z = (fr_push - fl_push);
     push_vector_z += (br_push - bl_push);
     push_vector_z *= 360;
 
@@ -132,7 +132,7 @@ void racer_fire_cannon(string tagname)
 
        // Fix z-aim (for chase mode)
     v = normalize(trace_endpos - bolt.origin);
-    v_forward_z = v.z * 0.5;
+    v_forward.z = v.z * 0.5;
     bolt.velocity = v_forward * autocvar_g_vehicle_racer_cannon_speed;
 }
 
index 9b78cdc5f365fcbf1a104775a6aea4c28b737dae..4533da6f3b212701e728cecc2709671df0c7c6ee 100644 (file)
@@ -433,7 +433,7 @@ float raptor_frame()
     if(player.movement.x > 0 && vang.x < autocvar_g_vehicle_raptor_pitchlimit) ftmp = 5;
     else if(player.movement.x < 0 && vang.x > -autocvar_g_vehicle_raptor_pitchlimit) ftmp = -20;
 
-    df_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, df.x , autocvar_g_vehicle_raptor_pitchlimit);
+    df.x = bound(-autocvar_g_vehicle_raptor_pitchlimit, df.x , autocvar_g_vehicle_raptor_pitchlimit);
     ftmp = vang.x - bound(-autocvar_g_vehicle_raptor_pitchlimit, df.x + ftmp, autocvar_g_vehicle_raptor_pitchlimit);
     raptor.avelocity_x = bound(-autocvar_g_vehicle_raptor_pitchspeed, ftmp + raptor.avelocity.x * 0.9, autocvar_g_vehicle_raptor_pitchspeed);
 
index c8ad08f14eefff0091c8ad632e43195bb18e0afc..c969e225ebc3bc21a3d504dfa7c80c9f465c6700 100644 (file)
@@ -164,9 +164,9 @@ vector spiberbot_calcartillery(vector org, vector tgt, float ht)
        solution = solve_quadratic(0.5 * grav, -vz, zdist); // equation "z(ti) = zdist"
        // ALWAYS solvable because jumpheight >= zdist
        if(!solution.z)
-               solution_y = solution.x; // just in case it is not solvable due to roundoff errors, assume two equal solutions at their center (this is mainly for the usual case with ht == 0)
+               solution.y = solution.x; // just in case it is not solvable due to roundoff errors, assume two equal solutions at their center (this is mainly for the usual case with ht == 0)
        if(zdist == 0)
-               solution_x = solution.y; // solution_x is 0 in this case, so don't use it, but rather use solution_y (which will be sqrt(0.5 * jumpheight / grav), actually)
+               solution.x = solution.y; // solution_x is 0 in this case, so don't use it, but rather use solution_y (which will be sqrt(0.5 * jumpheight / grav), actually)
 
        if(zdist < 0)
        {
@@ -374,11 +374,11 @@ float spiderbot_frame()
 
     // Rotate head
     ftmp = autocvar_g_vehicle_spiderbot_head_turnspeed * sys_frametime;
-    ad_y = bound(-ftmp, ad.y, ftmp);
+    ad.y = bound(-ftmp, ad.y, ftmp);
     spider.tur_head.angles_y = bound(autocvar_g_vehicle_spiderbot_head_turnlimit * -1, spider.tur_head.angles.y + ad.y, autocvar_g_vehicle_spiderbot_head_turnlimit);
 
     // Pitch head
-    ad_x = bound(ftmp * -1, ad.x, ftmp);
+    ad.x = bound(ftmp * -1, ad.x, ftmp);
     spider.tur_head.angles_x = bound(autocvar_g_vehicle_spiderbot_head_pitchlimit_down, spider.tur_head.angles.x + ad.x, autocvar_g_vehicle_spiderbot_head_pitchlimit_up);
 
 
index bea6d43d44ec76f825fab9476521b6042a3af621..96d54e3de7bfa832da6a1d6ba8458031389deed8 100644 (file)
@@ -725,7 +725,7 @@ vector vehicles_findgoodexit(vector prefer_spot)
     for(i = 0; i < 100; ++i)
     {
         v = randomvec();
-        v_z = 0;
+        v.z = 0;
         v = v2 + normalize(v) * mysize;
         tracebox(v2, PL_MIN, PL_MAX, v, MOVE_NORMAL, self.owner);
         if(trace_fraction == 1.0 && !trace_startsolid && !trace_allsolid)
@@ -1368,8 +1368,8 @@ vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string
     vtmp = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(_vehic.angles), AnglesTransform_FromAngles(vtmp))) - _turrret.angles;
     vtmp = AnglesTransform_Normalize(vtmp, true);
     ftmp = _aimspeed * frametime;
-    vtmp_y = bound(-ftmp, vtmp.y, ftmp);
-    vtmp_x = bound(-ftmp, vtmp.x, ftmp);
+    vtmp.y = bound(-ftmp, vtmp.y, ftmp);
+    vtmp.x = bound(-ftmp, vtmp.x, ftmp);
     _turrret.angles_y = bound(_rotlimit_min, _turrret.angles.y + vtmp.y, _rotlimit_max);
     _turrret.angles_x = bound(_pichlimit_min, _turrret.angles.x + vtmp.x, _pichlimit_max);
     return vtag;
index 58ada70ad1cd0ce9f7b70378f3aada68cc4ea632..ec1004cd1dfc2c57d24545332853b7e030954499 100644 (file)
@@ -13,9 +13,9 @@
 vector W_HitPlotUnnormalizedUntransform(vector screenforward, vector screenright, vector screenup, vector v)
 {
        vector ret;
-       ret_x = screenright * v;
-       ret_y = screenup * v;
-       ret_z = screenforward * v;
+       ret.x = screenright * v;
+       ret.y = screenup * v;
+       ret.z = screenforward * v;
        return ret;
 }
 
@@ -38,8 +38,8 @@ vector W_HitPlotNormalizedUntransform(vector org, entity targ, vector screenforw
                thisv = W_HitPlotUnnormalizedUntransform(screenforward, screenright, screenup, thisv);
                if(i || j || k)
                {
-                       if(mi.x > thisv.x) mi_x = thisv.x; if(ma.x < thisv.x) ma_x = thisv.x;
-                       if(mi.y > thisv.y) mi_y = thisv.y; if(ma.y < thisv.y) ma_y = thisv.y;
+                       if(mi.x > thisv.x) mi.x = thisv.x; if(ma.x < thisv.x) ma.x = thisv.x;
+                       if(mi.y > thisv.y) mi.y = thisv.y; if(ma.y < thisv.y) ma.y = thisv.y;
                        //if(mi_z > thisv_z) mi_z = thisv_z; if(ma_z < thisv_z) ma_y = thisv_z;
                }
                else
@@ -50,9 +50,9 @@ vector W_HitPlotNormalizedUntransform(vector org, entity targ, vector screenforw
        }
 
        thisv = W_HitPlotUnnormalizedUntransform(screenforward, screenright, screenup, v);
-       ret_x = (thisv.x - mi.x) / (ma.x - mi.x);
-       ret_y = (thisv.y - mi.y) / (ma.y - mi.y);
-       ret_z = thisv.z - myv.z;
+       ret.x = (thisv.x - mi.x) / (ma.x - mi.x);
+       ret.y = (thisv.y - mi.y) / (ma.y - mi.y);
+       ret.z = thisv.z - myv.z;
        return ret;
 }
 
index 98587ec810a66a69c4b7368fc4d6c905b7319220..e8a455b6ee25548bf67e22c68c15fd3e1626089d 100644 (file)
@@ -13,21 +13,21 @@ vector fixedvectoangles(vector a)
 {
        vector ang;
        ang = vectoangles(a);
-       ang_x = -ang.x;
+       ang.x = -ang.x;
        return ang;
 }
 vector fixedvectoangles2(vector a, vector b)
 {
        vector ang;
        ang = vectoangles2(a, b);
-       ang_x = -ang.x;
+       ang.x = -ang.x;
        return ang;
 }
 #else
 void fixedmakevectors(vector a)
 {
        // a makevectors that actually inverts vectoangles
-       a_x = -a.x;
+       a.x = -a.x;
        makevectors(a);
 }
 #endif
@@ -58,12 +58,12 @@ vector AnglesTransform_Invert(vector transform)
        // but these are orthogonal unit vectors!
        // so to invert, we can simply fixedvectoangles the TRANSPOSED matrix
        // TODO is this always -transform?
-       i_forward_x = v_forward.x;
-       i_forward_y = -v_right.x;
-       i_forward_z = v_up.x;
-       i_up_x = v_forward.z;
-       i_up_y = -v_right.z;
-       i_up_z = v_up.z;
+       i_forward.x = v_forward.x;
+       i_forward.y = -v_right.x;
+       i_forward.z = v_up.x;
+       i_up.x = v_forward.z;
+       i_up.y = -v_right.z;
+       i_up.z = v_up.z;
        return fixedvectoangles2(i_forward, i_up);
 }
 
@@ -73,9 +73,9 @@ vector AnglesTransform_TurnDirectionFR(vector transform)
        // changes in-direction to out-direction
        //fixedmakevectors(transform);
        //return fixedvectoangles2(-1 * v_forward, 1 * v_up);
-       transform_x = -transform.x;
-       transform_y = 180 + transform.y;
-       transform_z = -transform.z;
+       transform.x = -transform.x;
+       transform.y = 180 + transform.y;
+       transform.z = -transform.z;
        // pitch: -s +c
        // yaw:   -s -c
        // roll:  -s +c
@@ -88,9 +88,9 @@ vector AnglesTransform_TurnDirectionFU(vector transform)
        // changes in-direction to out-direction
        //fixedmakevectors(transform);
        //return fixedvectoangles2(-1 * v_forward, 1 * v_up);
-       transform_x = -transform.x;
-       transform_y = 180 + transform.y;
-       transform_z = 180 - transform.z;
+       transform.x = -transform.x;
+       transform.y = 180 + transform.y;
+       transform.z = 180 - transform.z;
        return transform;
 }
 
@@ -108,16 +108,16 @@ vector AnglesTransform_Normalize(vector t, float minimize_roll)
 {
        float need_flip;
        // first, bring all angles in their range...
-       t_x = t.x - 360 * rint(t.x / 360);
-       t_y = t.y - 360 * rint(t.y / 360);
-       t_z = t.z - 360 * rint(t.z / 360);
+       t.x = t.x - 360 * rint(t.x / 360);
+       t.y = t.y - 360 * rint(t.y / 360);
+       t.z = t.z - 360 * rint(t.z / 360);
        if(minimize_roll)
                need_flip = (t.z > 90 || t.z <= -90);
        else
                need_flip = (t.x > 90 || t.x < -90); // for pitch we prefer to allow exactly -90 degrees for looking straight down
        if(need_flip)
        {
-               if(t.x >= 0) t_x = 180 - t.x; else t_x = -180 - t.x;
+               if(t.x >= 0) t.x = 180 - t.x; else t.x = -180 - t.x;
                if(t.y > 0) t.y -= 180; else t.y += 180;
                if(t.z > 0) t.z -= 180; else t.z += 180;
        }
@@ -141,7 +141,7 @@ vector AnglesTransform_CancelRoll(vector t)
        {
                //t_x = -90;
                t.y += t.z;
-               t_z = 0;
+               t.z = 0;
        }
        else
        {
@@ -150,7 +150,7 @@ vector AnglesTransform_CancelRoll(vector t)
                {
                        //t_x = 90;
                        t.y -= t.z;
-                       t_z = 0;
+                       t.z = 0;
                }
        }
        return t;
@@ -159,9 +159,9 @@ vector AnglesTransform_CancelRoll(vector t)
 #ifdef POSITIVE_PITCH_IS_DOWN
 vector AnglesTransform_ApplyToAngles(vector transform, vector v)
 {
-       v_x = -v.x;
+       v.x = -v.x;
        v = AnglesTransform_Multiply(transform, v);
-       v_x = -v.x;
+       v.x = -v.x;
        return v;
 }
 vector AnglesTransform_ApplyToVAngles(vector transform, vector v)
@@ -171,12 +171,12 @@ vector AnglesTransform_ApplyToVAngles(vector transform, vector v)
 }
 vector AnglesTransform_FromAngles(vector v)
 {
-       v_x = -v.x;
+       v.x = -v.x;
        return v;
 }
 vector AnglesTransform_ToAngles(vector v)
 {
-       v_x = -v.x;
+       v.x = -v.x;
        return v;
 }
 vector AnglesTransform_FromVAngles(vector v)
@@ -195,9 +195,9 @@ vector AnglesTransform_ApplyToAngles(vector transform, vector v)
 }
 vector AnglesTransform_ApplyToVAngles(vector transform, vector v)
 {
-       v_x = -v.x;
+       v.x = -v.x;
        v = AnglesTransform_Multiply(transform, v);
-       v_x = -v.x;
+       v.x = -v.x;
        return v;
 }
 vector AnglesTransform_FromAngles(vector v)
@@ -210,12 +210,12 @@ vector AnglesTransform_ToAngles(vector v)
 }
 vector AnglesTransform_FromVAngles(vector v)
 {
-       v_x = -v.x;
+       v.x = -v.x;
        return v;
 }
 vector AnglesTransform_ToVAngles(vector v)
 {
-       v_x = -v.x;
+       v.x = -v.x;
        return v;
 }
 #endif
index 3e651a076e283b331b79add264b100a570f301a2..5c2609a7dfbd388d8cb1b1172974b74fd8dbbd5a 100644 (file)
@@ -151,9 +151,9 @@ void WarpZone_Teleported_Read(float isnew)
 {
        vector v;
        self.classname = "warpzone_teleported";
-       v_x = ReadCoord();
-       v_y = ReadCoord();
-       v_z = ReadCoord();
+       v.x = ReadCoord();
+       v.y = ReadCoord();
+       v.z = ReadCoord();
        if(!isnew)
                return;
        self.warpzone_transform = v;
@@ -194,12 +194,12 @@ vector WarpZone_FixNearClip(vector o, vector c0, vector c1, vector c2, vector c3
        entity e;
        float pd;
 
-       mi_x = min(o.x, c0_x, c1_x, c2_x, c3_x);
-       ma_x = max(o.x, c0_x, c1_x, c2_x, c3_x);
-       mi_y = min(o.y, c0_y, c1_y, c2_y, c3_y);
-       ma_y = max(o.y, c0_y, c1_y, c2_y, c3_y);
-       mi_z = min(o.z, c0_z, c1_z, c2_z, c3_z);
-       ma_z = max(o.z, c0_z, c1_z, c2_z, c3_z);
+       mi.x = min(o.x, c0_x, c1_x, c2_x, c3_x);
+       ma.x = max(o.x, c0_x, c1_x, c2_x, c3_x);
+       mi.y = min(o.y, c0_y, c1_y, c2_y, c3_y);
+       ma.y = max(o.y, c0_y, c1_y, c2_y, c3_y);
+       mi.z = min(o.z, c0_z, c1_z, c2_z, c3_z);
+       ma.z = max(o.z, c0_z, c1_z, c2_z, c3_z);
 
        e = WarpZone_Find(mi, ma);
        if(e)
index 3bec4be519b5ec7fe7fa4b751e94b1eabf8c03f2..c36ca5c62de709f5950e1ebb3d2839453fac7d5f 100644 (file)
@@ -518,7 +518,7 @@ vector WarpZone_TransformVAngles(entity wz, vector ang)
 #ifdef KEEP_ROLL
        float roll;
        roll = ang.z;
-       ang_z = 0;
+       ang.z = 0;
 #endif
 
        ang = AnglesTransform_ApplyToVAngles(wz.warpzone_transform, ang);
@@ -526,7 +526,7 @@ vector WarpZone_TransformVAngles(entity wz, vector ang)
 #ifdef KEEP_ROLL
        ang = AnglesTransform_Normalize(ang, true);
        ang = AnglesTransform_CancelRoll(ang);
-       ang_z = roll;
+       ang.z = roll;
 #else
        ang = AnglesTransform_Normalize(ang, false);
 #endif
@@ -554,22 +554,22 @@ vector WarpZone_UnTransformVAngles(entity wz, vector ang)
        float roll;
 
        roll = ang.z;
-       ang_z = 0;
+       ang.z = 0;
 
        ang = AnglesTransform_ApplyToVAngles(AnglesTransform_Invert(wz.warpzone_transform), ang);
        ang = AnglesTransform_Normalize(ang, true);
        ang = AnglesTransform_CancelRoll(ang);
 
-       ang_z = roll;
+       ang.z = roll;
        return ang;
 }
 
 vector WarpZoneLib_NearestPointOnBox(vector mi, vector ma, vector org)
 {
        vector nearest;
-       nearest_x = bound(mi.x, org.x, ma.x);
-       nearest_y = bound(mi.y, org.y, ma.y);
-       nearest_z = bound(mi.z, org.z, ma.z);
+       nearest.x = bound(mi.x, org.x, ma.x);
+       nearest.y = bound(mi.y, org.y, ma.y);
+       nearest.z = bound(mi.z, org.z, ma.z);
        return nearest;
 }
 
index 8dd9684e52dd70ece4016da89c6ceb659e81ab8d..b948b203eeb36ac4a06d00b6a91ab038b6dc1be3 100644 (file)
@@ -82,9 +82,9 @@ float expm1(float x)
 vector frexp(float x)
 {
        vector v;
-       v_z = 0;
-       v_y = ilogb(x) + 1;
-       v_x = x / exp2(v.y);
+       v.z = 0;
+       v.y = ilogb(x) + 1;
+       v.x = x / exp2(v.y);
        return v;
 }
 int ilogb(float x)
@@ -156,11 +156,11 @@ vector lgamma(float x)
                // gamma(1-z) * gamma(z) = pi / sin(pi*z)
                // lgamma(1-z) + lgamma(z) = log(pi) - log(sin(pi*z))
                // sign of gamma(1-z) = sign of gamma(z) * sign of sin(pi*z)
-               v_z = sin(M_PI * x);
-               v_x = log(M_PI) - log(fabs(v.z)) - v.x;
+               v.z = sin(M_PI * x);
+               v.x = log(M_PI) - log(fabs(v.z)) - v.x;
                if(v.z < 0)
-                       v_y = -v.y;
-               v_z = 0;
+                       v.y = -v.y;
+               v.z = 0;
                return v;
        }
        if(x < 1.1)
@@ -195,9 +195,9 @@ float remainder(float x, float y)
 vector remquo(float x, float y)
 {
        vector v;
-       v_z = 0;
-       v_y = rint(x / y);
-       v_x = x - y * v.y;
+       v.z = 0;
+       v.y = rint(x / y);
+       v.x = x - y * v.y;
        return v;
 }
 
index bf7c1bcac45c858dc0a09956027592438b027644..090db021b317fae3bd9938665c453322761872f6 100644 (file)
@@ -218,11 +218,10 @@ void WarpZone_Touch (void)
 
 float WarpZone_Send(entity to, float sendflags)
 {
-       float f;
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE);
 
        // we must send this flag for clientside to match properly too
-       f = 0;
+       int f = 0;
        if(self.warpzone_isboxy)
                BITSET_ASSIGN(f, 1);
        if(self.warpzone_fadestart)
@@ -273,7 +272,7 @@ float WarpZone_Send(entity to, float sendflags)
 
 float WarpZone_Camera_Send(entity to, float sendflags)
 {
-       float f = 0;
+       int f = 0;
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
 
        if(self.warpzone_fadestart)
@@ -599,7 +598,7 @@ void WarpZone_InitStep_UpdateTransform()
                                norm = -1 * norm;
                        }
                        ang = vectoangles2(norm, v_up); // keep rotation, but turn exactly against plane
-                       ang_x = -ang.x;
+                       ang.x = -ang.x;
                        if(norm * v_forward < 0.99)
                                print("trigger_warpzone near ", vtos(self.aiment.origin), " has been turned to match plane orientation (", vtos(self.aiment.angles), " -> ", vtos(ang), "\n");
                        if(vlen(org - self.aiment.origin) > 0.5)
@@ -610,7 +609,7 @@ void WarpZone_InitStep_UpdateTransform()
        {
                org = point;
                ang = vectoangles(norm);
-               ang_x = -ang.x;
+               ang.x = -ang.x;
        }
        else
                error("cannot infer origin/angles for this warpzone, please use a killtarget or a trigger_warpzone_position");