mirror of
https://github.com/rei-2/Amalgam
synced 2026-10-10 12:53:10 +08:00
misc antiaim changes
This commit is contained in:
@@ -198,10 +198,10 @@ void CAntiAim::MinWalk(CTFPlayer* pLocal, CUserCmd* pCmd, bool bSendPacket)
|
||||
if (!Vars::AntiHack::AntiAim::MinWalk.Value || !F::AntiAim.YawOn() || G::DoubleTap || !pLocal->m_hGroundEntity() || pLocal->IsInBumperKart())
|
||||
return;
|
||||
|
||||
static bool bVar = true;
|
||||
if (!pCmd->forwardmove && !pCmd->sidemove && pLocal->m_vecVelocity().Length2D() < 10.f)
|
||||
{
|
||||
float flMove = (pLocal->IsDucking() ? 14.f : 1.f) * ((bVar = !bVar) ? 1 : -1);
|
||||
static bool bVar = true;
|
||||
float flMove = (pLocal->IsDucking() ? 3 : 1) * ((bVar = !bVar) ? 1 : -1);
|
||||
Vec3 vDir = { flMove, flMove, 0 };
|
||||
|
||||
Vec3 vMove = Math::RotatePoint(vDir, {}, { 0, -pCmd->viewangles.y, 0 });
|
||||
|
||||
@@ -23,6 +23,8 @@ public:
|
||||
int GetEdge(CTFPlayer* pEntity, float flEdgeOrigYaw, bool bUpPitch);
|
||||
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bool bSendPacket);
|
||||
|
||||
inline int AntiAimTicks() { return 3; }
|
||||
|
||||
Vec2 vFakeAngles = {};
|
||||
Vec2 vRealAngles = {};
|
||||
std::vector<std::pair<Vec3, Vec3>> vEdgeTrace = {};
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
static inline bool AntiAimCheck(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
|
||||
{
|
||||
return F::AntiAim.YawOn() && F::AntiAim.ShouldRun(pLocal, pWeapon, pCmd) && I::ClientState->chokedcommands < 3 && !G::Recharge;
|
||||
return F::AntiAim.YawOn() && F::AntiAim.ShouldRun(pLocal, pWeapon, pCmd) && !G::Recharge
|
||||
&& I::ClientState->chokedcommands < F::AntiAim.AntiAimTicks();
|
||||
}
|
||||
|
||||
void CPacketManip::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bool* pSendPacket)
|
||||
|
||||
@@ -205,7 +205,7 @@ void CTickshiftHandler::MoveMain(float accumulated_extra_samples, bool bFinalTic
|
||||
static auto sv_maxusrcmdprocessticks = U::ConVars.FindVar("sv_maxusrcmdprocessticks");
|
||||
G::MaxShift = sv_maxusrcmdprocessticks ? sv_maxusrcmdprocessticks->GetInt() : 24;
|
||||
if (F::AntiAim.YawOn())
|
||||
G::MaxShift -= 3;
|
||||
G::MaxShift -= F::AntiAim.AntiAimTicks();
|
||||
|
||||
while (G::ShiftedTicks > G::MaxShift)
|
||||
CLMoveFunc(accumulated_extra_samples, false); // skim any excess ticks
|
||||
|
||||
Reference in New Issue
Block a user