Official site anti-cheat Ultra Core Protector

Home Download F.A.Q. Addons Monitor Forum Support Advertise English version site UCP Anti-Cheat  Russian version site UCP Anti-Cheat
Ultra Core Protector - is the client-server anti-cheat freeware, for server protection from unscrupulous players.

Abilities Supported games  
Half-Life
Condition Zero
Counter-Strike 1.6
Day of Defeat
Adrenaline Gamer
Team Fortress Classic
Counter-Strike Source
MU Online
Ragnarok Online
Half-Life 2 Deathmatch
Adrenaline Gamer 2
Team Fortress 2
Using VectorAngles over CalcAngle

Hi,

I’ve heard using VectorAngles for an aimbot is a lot more accurate and I should move from CalcAngle over to it. For starters, is that true? Also, how would I go about implementing that into my aimbot function;

void DoAim(CUserCmd* pCmd, C_BaseEntity* local, C_BaseCombatWeapon* weapon, bool& bSendPacket)
{
if(!vars.aimbot.enabled)
return;

Vector eyepos = local->GetEyePosition();

for(int i = 0; i < pEntList->GetHighestEntityIndex(); i++)
{
auto* entity = pEntList->GetClientEntity(i);

if(!entity)
continue;

if(entity == local)
continue;

if(entity->GetTeam() == local->GetTeam())
continue;

if(entity->GetHealth() < 1) continue; if(entity->GetDormant())
continue;

if(entity->GetImmune())
continue;

if(weapon->GetAmmo() < 1) continue; if(weapon->IsKnife() || weapon->IsBomb())
continue;

if (vars.visuals.flashc && local->GetFlashDuration() - pGlobals->curtime > 2.0f)
return;

if(gCorrections[entity->GetIndex()].whitelist)
continue;

Vector vFrom, vTo;

Aimbot::curTarget = entity;

vFrom = GetHitboxPosition(entity, Hitscan(entity));

if(vars.aimbot.prediction)
eyepos += entity->GetVelocity() * pGlobals->interval_per_tick;

vTo = CalcAngle(eyepos, vFrom);

auto isVISIBLE = IsVisible(local, entity);
float getdmg = 0.f;
Autowall::FireBulletData data;
bool canHit = false;

if(vars.aimbot.autowall)
{
getdmg = Autowall::GetDamage(vFrom, true, data);
canHit = getdmg >= vars.aimbot.mindmg;
}

atTargets = vTo;

if(canHit || isVISIBLE)
{
if(GetFOV(pCmd->viewangles, local->GetEyePosition(), vFrom) <= vars.aimbot.fov) { if(vars.aimbot.autoshoot) { AutoShoot(local, weapon, pCmd); } if(vars.aimbot.autocrouch) { pCmd->buttons |= IN_DUCK;
}

if(vars.aimbot.smooth) {
pCmd->viewangles = Smooth(vTo);
}

if(pCmd->buttons & IN_ATTACK)
{
if(!vars.aimbot.silent)
{
pCmd->viewangles = vTo;
pEngine->SetViewAngles(pCmd->viewangles);
}
else
{
pCmd->viewangles = vTo;
}

}

}

}

}

}

I’ve tried assigning vTo to VectorAngles(eyepos, vFrom), however that obviously won’t work as VectorAngles is a function.

I’m a complete retard when it comes to this stuff, but my theory is that instead of;

pCmd->viewangles = vTo;

I should be just going;

VectorAngles(eyepos, vFrom)

But yet again, I’m probably completely wrong so if you could help that’d be great.