Remove Fake crouch

This commit is contained in:
LightCat 2019-03-17 17:58:48 +01:00
parent 329662a2fa
commit 3d41a66234

View File

@ -12,9 +12,6 @@
#include "common.hpp"
static settings::Bool enable{ "antiaim.enable", "0" };
static settings::Bool crouch{ "antiaim.crouch", "0" };
static settings::Int dur{ "antiaim.crouch.dur", "15" };
static settings::Int dursneak{ "antiaim.crouch.dursneak", "15" };
static settings::Float yaw{ "antiaim.yaw.static", "0" };
static settings::Int yaw_mode{ "antiaim.yaw.mode", "0" };
@ -356,41 +353,6 @@ float useEdge(float edgeViewAngle)
// return with the angle choosen
return edgeYaw;
}
Timer delay{};
int val = 0;
int value[32] = { 0 };
void FakeCrouch(CUserCmd *cmd)
{
if (!crouch || !(cmd->buttons & IN_DUCK))
return;
static bool bDoCrouch = false;
static int iCrouchCount = 0;
if (iCrouchCount == *dur)
{
iCrouchCount = 0;
bDoCrouch = !bDoCrouch;
}
else
{
iCrouchCount++;
}
if (bDoCrouch)
{
cmd->buttons |= IN_DUCK;
*bSendPackets = true;
}
else
{
if (iCrouchCount + *dursneak < *dur)
cmd->buttons &= ~IN_DUCK;
*bSendPackets = false;
}
if ((cmd->buttons & IN_ATTACK))
*bSendPackets = true;
}
static float randyaw = 0.0f;
void ProcessUserCmd(CUserCmd *cmd)
{
@ -600,7 +562,6 @@ void ProcessUserCmd(CUserCmd *cmd)
p = GetAAAAPitch();
}
g_pLocalPlayer->bUseSilentAngles = true;
FakeCrouch(cmd);
}
bool isEnabled()