I was running an aimbot in casual and got a untrusted ban which means my hack is doing something wrong, although this confuses me because according to what I have read this shouldn't happen with what I have.
Angle Normalization:
Code:
static Vector NormalizeAngle(Vector angles)
{
if (float.IsInfinity(angles.x))
{
angles.x = 0.0f;
}
if (float.IsInfinity(angles.y))
{
angles.y = 0.0f;
}
while (angles.y < -180.0f) angles.y += 360.0f;
while (angles.y > 180.0f) angles.y -= 360.0f;
if (angles.x > 89.0f) angles.x = 89.0f;
if (angles.x < -89.0f) angles.x = -89.0f;
angles.z = 0.0f;
return angles;
}
CalcAngle:
Code:
static Vector CalcAngle(Vector src, Vector dst)
{
Vector angle;
Vector delta;
delta.x = src.x - dst.x;
delta.y = src.y - dst.y;
delta.z = src.z - dst.z;
double hyp = Math.Sqrt(delta.x * delta.x + delta.y * delta.y);
angle.x = (float)(Math.Atan((delta.z + 64.06f) / hyp) * 57.295779513082f);
angle.y = (float)(Math.Atan(delta.y / delta.x) * 57.295779513082f);
angle.z = 0.0f;
if (delta.x >= 0.0)
angle.y += 180.0f;
return angle;
}
Get Recoil Punch:
Code:
static Vector GetPunch()
{
int localplayer = Mem.ReadInt(clientdll + m_dwLocalPlayer);
Vector angle;
angle.x = Mem.ReadFloat(localplayer + m_vecPunch);
angle.y = Mem.ReadFloat(localplayer + m_vecPunch + 0x4);
angle.z = 0.0f;
return angle;
}
I run angle normalization before rcs and after, and I have read several threads and looked at my angles while playing and they appear to be fine so I'm confused to what caused my ban.
I'm also using spottedmask for visibility checks but this shouldn't cause an untrusted ban.