Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float localPlayerEyes[3];
- localPlayerEyes[0] = LocalPlayer.vecOrigin[0] + LocalPlayer.vecViewOffset[0];
- localPlayerEyes[1] = LocalPlayer.vecOrigin[1] + LocalPlayer.vecViewOffset[1];
- localPlayerEyes[2] = LocalPlayer.vecOrigin[2] + LocalPlayer.vecViewOffset[2];
- float lpeMinusTarget[3];
- lpeMinusTarget[0] = EntityList[i].headBoneXYZ[0] - localPlayerEyes[0];
- lpeMinusTarget[1] = EntityList[i].headBoneXYZ[1] - localPlayerEyes[1];
- lpeMinusTarget[2] = localPlayerEyes[2] - EntityList[i].headBoneXYZ[2];
- float targetAngles[3];
- calcVectorAngles(lpeMinusTarget, targetAngles);
- AimbotVictim.pitch = targetAngles[0];
- AimbotVictim.yaw = targetAngles[1];
- float yawDifference = fabs(LocalPlayer.viewAngle[0] - AimbotVictim.yaw);
- float dist = sqrt(
- (AimbotVictim.pitch - LocalPlayer.viewAngle[0]) * (AimbotVictim.pitch - LocalPlayer.viewAngle[0]) +
- (AimbotVictim.yaw - LocalPlayer.viewAngle[1]) * (AimbotVictim.yaw - LocalPlayer.viewAngle[1]) +
- (AimbotVictim.roll - LocalPlayer.viewAngle[2]) * (AimbotVictim.roll - LocalPlayer.viewAngle[2])
- );
- float realDistance = sin(D3DXToRadian(yawDifference)) * dist;
- if (realDistance < aimbotBestFOV)
- {
- aimbotBestFOV = realDistance;
- AimbotVictim.ID = i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement