|
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;
Vector eyepos = local->GetEyePosition(); for(int i = 0; i < pEntList->GetHighestEntityIndex(); i++) if(!entity) if(entity == local) if(entity->GetTeam() == local->GetTeam()) if(entity->GetHealth() < 1)
continue;
if(entity->GetDormant()) if(entity->GetImmune()) if(weapon->GetAmmo() < 1)
continue;
if(weapon->IsKnife() || weapon->IsBomb()) if (vars.visuals.flashc && local->GetFlashDuration() - pGlobals->curtime > 2.0f) if(gCorrections[entity->GetIndex()].whitelist) Vector vFrom, vTo; Aimbot::curTarget = entity; vFrom = GetHitboxPosition(entity, Hitscan(entity)); if(vars.aimbot.prediction) vTo = CalcAngle(eyepos, vFrom); auto isVISIBLE = IsVisible(local, entity); if(vars.aimbot.autowall) atTargets = vTo; if(canHit || isVISIBLE) if(vars.aimbot.smooth) { if(pCmd->buttons & IN_ATTACK) } } } } } 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;
I should be just going;
But yet again, I’m probably completely wrong so if you could help that’d be great. |
|