havocbot_middlepoint = s / n;
havocbot_middlepoint_radius = vlen(fo - havocbot_middlepoint);
- havocbot_symmetryaxis_equation = '0 0 0';
+ havocbot_symmetry_axis_m = 0;
+ havocbot_symmetry_axis_q = 0;
if(n == 2)
{
// for symmetrical editing of waypoints
entity f2 = f1.ctf_worldflagnext;
float m = -(f1.origin.y - f2.origin.y) / (f1.origin.x - f2.origin.x);
float q = havocbot_middlepoint.y - m * havocbot_middlepoint.x;
- havocbot_symmetryaxis_equation.x = m;
- havocbot_symmetryaxis_equation.y = q;
+ havocbot_symmetry_axis_m = m;
+ havocbot_symmetry_axis_q = q;
}
- // store number of flags in this otherwise unused vector component
- havocbot_symmetryaxis_equation.z = n;
+ havocbot_symmetry_origin_order = n;
}
vector havocbot_middlepoint;
float havocbot_middlepoint_radius;
-vector havocbot_symmetryaxis_equation;
+float havocbot_symmetry_axis_m;
+float havocbot_symmetry_axis_q;
+float havocbot_symmetry_origin_order;
.float goalentity_lock_timeout;
.float ignoregoaltime;
}
else if (fabs(autocvar_g_waypointeditor_symmetrical) == 2)
{
- float m = havocbot_symmetryaxis_equation.x;
- float q = havocbot_symmetryaxis_equation.y;
+ float m = havocbot_symmetry_axis_m;
+ float q = havocbot_symmetry_axis_q;
if (autocvar_g_waypointeditor_symmetrical == -2)
{
m = autocvar_g_waypointeditor_symmetrical_axis.x;
{
entity e;
vector org = pl.origin;
- int ctf_flags = havocbot_symmetryaxis_equation.z;
+ int ctf_flags = havocbot_symmetry_origin_order;
bool sym = ((autocvar_g_waypointeditor_symmetrical > 0 && ctf_flags >= 2)
|| (autocvar_g_waypointeditor_symmetrical < 0));
int order = ctf_flags;
{
entity e = navigation_findnearestwaypoint(pl, false);
- int ctf_flags = havocbot_symmetryaxis_equation.z;
+ int ctf_flags = havocbot_symmetry_origin_order;
bool sym = ((autocvar_g_waypointeditor_symmetrical > 0 && ctf_flags >= 2)
|| (autocvar_g_waypointeditor_symmetrical < 0));
int order = ctf_flags;