Changed edge to be a yaw_mode option
This commit is contained in:
parent
77ebecd879
commit
5ce592cfce
@ -481,7 +481,6 @@ static const std::string list_tf2 = R"(
|
|||||||
"aa_yaw_mode"
|
"aa_yaw_mode"
|
||||||
"aa_spin"
|
"aa_spin"
|
||||||
"aa_roll"
|
"aa_roll"
|
||||||
"aa_edge"
|
|
||||||
"aa_no_clamp"
|
"aa_no_clamp"
|
||||||
"Anti-Anti-AA" [
|
"Anti-Anti-AA" [
|
||||||
"Anti-Anti-Anti-Aim Menu"
|
"Anti-Anti-Anti-Aim Menu"
|
||||||
|
@ -15,13 +15,12 @@ namespace hacks { namespace shared { namespace antiaim {
|
|||||||
CatVar enabled(CV_SWITCH, "aa_enabled", "0", "Anti-Aim", "Master AntiAim switch");
|
CatVar enabled(CV_SWITCH, "aa_enabled", "0", "Anti-Aim", "Master AntiAim switch");
|
||||||
CatVar yaw(CV_FLOAT, "aa_yaw", "0.0", "Yaw", "Static yaw (left/right)", 360.0);
|
CatVar yaw(CV_FLOAT, "aa_yaw", "0.0", "Yaw", "Static yaw (left/right)", 360.0);
|
||||||
CatVar pitch(CV_FLOAT, "aa_pitch", "-89.0", "Pitch", "Static pitch (up/down)", -89.0, 89.0);
|
CatVar pitch(CV_FLOAT, "aa_pitch", "-89.0", "Pitch", "Static pitch (up/down)", -89.0, 89.0);
|
||||||
CatEnum yaw_mode_enum({ "KEEP", "STATIC", "JITTER", "BIGRANDOM", "RANDOM", "SPIN", "OFFSETKEEP" });
|
CatEnum yaw_mode_enum({ "KEEP", "STATIC", "JITTER", "BIGRANDOM", "RANDOM", "SPIN", "OFFSETKEEP", "EDGE" });
|
||||||
CatEnum pitch_mode_enum({ "KEEP", "STATIC", "JITTER", "RANDOM", "FLIP", "FAKEFLIP", "FAKEUP", "FAKEDOWN", "UP", "DOWN" });
|
CatEnum pitch_mode_enum({ "KEEP", "STATIC", "JITTER", "RANDOM", "FLIP", "FAKEFLIP", "FAKEUP", "FAKEDOWN", "UP", "DOWN" });
|
||||||
CatVar yaw_mode(yaw_mode_enum, "aa_yaw_mode", "0", "Yaw mode", "Yaw mode");
|
CatVar yaw_mode(yaw_mode_enum, "aa_yaw_mode", "0", "Yaw mode", "Yaw mode");
|
||||||
CatVar pitch_mode(pitch_mode_enum, "aa_pitch_mode", "0", "Pitch mode", "Pitch mode");
|
CatVar pitch_mode(pitch_mode_enum, "aa_pitch_mode", "0", "Pitch mode", "Pitch mode");
|
||||||
CatVar roll(CV_FLOAT, "aa_roll", "0", "Roll", "Roll angle (viewangles.z)", -180, 180);
|
CatVar roll(CV_FLOAT, "aa_roll", "0", "Roll", "Roll angle (viewangles.z)", -180, 180);
|
||||||
CatVar no_clamping(CV_SWITCH, "aa_no_clamp", "0", "Don't clamp angles", "Use this with STATIC mode for unclamped manual angles");
|
CatVar no_clamping(CV_SWITCH, "aa_no_clamp", "0", "Don't clamp angles", "Use this with STATIC mode for unclamped manual angles");
|
||||||
CatVar edge(CV_SWITCH, "aa_edge", "0", "Edge", "Automaticly selects yaw for edging");
|
|
||||||
CatVar spin(CV_FLOAT, "aa_spin", "10.0", "Spin speed", "Spin speed (degrees/second)");
|
CatVar spin(CV_FLOAT, "aa_spin", "10.0", "Spin speed", "Spin speed (degrees/second)");
|
||||||
|
|
||||||
CatVar aaaa_enabled(CV_SWITCH, "aa_aaaa_enabled", "0", "Enable AAAA", "Enable Anti-Anti-Anti-Aim (Overrides AA Pitch)");
|
CatVar aaaa_enabled(CV_SWITCH, "aa_aaaa_enabled", "0", "Enable AAAA", "Enable Anti-Anti-Anti-Aim (Overrides AA Pitch)");
|
||||||
@ -154,9 +153,6 @@ float edgeDistance(float edgeRayYaw) {
|
|||||||
|
|
||||||
//Function to Find an edge and report if one is found at all
|
//Function to Find an edge and report if one is found at all
|
||||||
bool findEdge(float edgeOrigYaw) {
|
bool findEdge(float edgeOrigYaw) {
|
||||||
//Stop the finstion and report that no edge has been found
|
|
||||||
if (!edge) return false;
|
|
||||||
|
|
||||||
//distance two vectors and report their combined distances
|
//distance two vectors and report their combined distances
|
||||||
float edgeLeftDist = edgeDistance(edgeOrigYaw - 21);
|
float edgeLeftDist = edgeDistance(edgeOrigYaw - 21);
|
||||||
edgeLeftDist = edgeLeftDist + edgeDistance(edgeOrigYaw - 27);
|
edgeLeftDist = edgeLeftDist + edgeDistance(edgeOrigYaw - 27);
|
||||||
@ -218,11 +214,6 @@ void ProcessUserCmd(CUserCmd* cmd) {
|
|||||||
float& y = cmd->viewangles.y;
|
float& y = cmd->viewangles.y;
|
||||||
static bool flip = false;
|
static bool flip = false;
|
||||||
bool clamp = !no_clamping;
|
bool clamp = !no_clamping;
|
||||||
//Attemt to find an edge
|
|
||||||
if (findEdge(y)) {
|
|
||||||
//use the edge found
|
|
||||||
y = useEdge(y);
|
|
||||||
} else {
|
|
||||||
switch ((int)yaw_mode) {
|
switch ((int)yaw_mode) {
|
||||||
case 1: // FIXED
|
case 1: // FIXED
|
||||||
y = (float)yaw;
|
y = (float)yaw;
|
||||||
@ -247,8 +238,12 @@ void ProcessUserCmd(CUserCmd* cmd) {
|
|||||||
case 6: // OFFSETKEEP
|
case 6: // OFFSETKEEP
|
||||||
y += (float)yaw;
|
y += (float)yaw;
|
||||||
break;
|
break;
|
||||||
|
case 7: //Edge
|
||||||
|
//Attemt to find an edge and if found, edge
|
||||||
|
if (findEdge(y)) y = useEdge(y);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
switch ((int)pitch_mode) {
|
switch ((int)pitch_mode) {
|
||||||
case 1:
|
case 1:
|
||||||
p = (float)pitch;
|
p = (float)pitch;
|
||||||
|
Reference in New Issue
Block a user