Author Topic: VC Aimbot problem.  (Read 1070 times)

0 Members and 1 Guest are viewing this topic.

Subsky

  • Insane Joker
  • ****
  • Posts: 504
  • Subskii
    • View Profile
VC Aimbot problem.
« on: June 25, 2008, 12:13:24 pm »
This is more a question for the elite here, like MrM.

My aimbot isn't rotating correctly.  Ignoring pitch for now, and focusing only on yaw in the 1st quadrant- this is what I have...

Code: [Select]
void CVietcongAimbot::Update()
{
VC_LOCALPLAYER* pLocalPlayer = this->GetLocalPlayer();
VC_NETPLAYER* pNetTargetPlayer = this->GetNetTargetPlayer();

if( (this->IsOn()) &&
(NULL != pLocalPlayer) &&
(NULL != pNetTargetPlayer) )
{
float Xdif;
float Zdif;
float Ydif;
float angleR;

//Target player is in 1st quadrant
if(pNetTargetPlayer->pos.x > pLocalPlayer->pos.x && pNetTargetPlayer->pos.z > pLocalPlayer->pos.z)
{
Xdif = pNetTargetPlayer->pos.x - pLocalPlayer->pos.x;
Zdif = pNetTargetPlayer->pos.z - pLocalPlayer->pos.z;

angleR = atan(Zdif / Xdif);
pLocalPlayer->fYaw = angleR;
}

... other quadrants removed, only focusing on first for now.

Vietcong stores rotation values as floats in radians IE 2*PI = 1 full revolution.  No need to convert back and forth from degrees etc.

VietcongAimbot.Update() is called from within DrawIndexedPrimitive(); but I've also tried in GetTransform() and SetTransform()...

I can not see anything wrong with the maths either, yet it doesn't work.

Could someone shed some light on this?

Also, Medic- did you reverse the VC 3D vector to be:

Code: [Select]
struct c_Vector3 { float x; float z; float y; };

Thanks
« Last Edit: June 25, 2008, 01:25:05 pm by Subsky »

Subsky

  • Insane Joker
  • ****
  • Posts: 504
  • Subskii
    • View Profile
Re: VC Aimbot problem.
« Reply #1 on: June 25, 2008, 02:13:12 pm »
Dw fixed it :icon_thumbsup.

That aside- any idea why this doesn't work

Code: [Select]
...in D8HK_SetTransform()

D3DXVECTOR3 pos(pVCLocalPlayer->pos.x, pVCLocalPlayer->pos.y, pVCLocalPlayer->pos.z);
D3DXVECTOR3 target(pVCNetTargetPlayer->pos.x, pVCNetTargetPlayer->pos.y, pVCNetTargetPlayer->pos.z);
D3DXVECTOR3 up(0, 1, 0);

D3DXMATRIX lookat;
D3DXMatrixLookAtLH(&lookat, &pos, &target, &up);

return m_pD3Ddev->SetTransform(D3DTS_VIEW, &lookat);
« Last Edit: June 25, 2008, 02:59:48 pm by Subsky »

MrMedic

  • Moderator
  • MasstKer
  • *
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: VC Aimbot problem.
« Reply #2 on: June 25, 2008, 04:15:27 pm »
without the full source i couldnt say , but im assuming you are taking into concideration this

d3dvector can be used if you input the playerstructs and use them to see where the player is , remember its not dependant on wether they are infront or behind you it is more dependent on wether the game check is on first view check and then where they are in spacial view

something like

if (pNetTargetPlayer->pos.x >180) pNetTargetPlayer->pos.x-=360; etc etc for x y z respectively

same for <-180 +=360 etc

then set aim

+ - relative to location
« Last Edit: June 25, 2008, 04:26:36 pm by MrMedic »
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

Subsky

  • Insane Joker
  • ****
  • Posts: 504
  • Subskii
    • View Profile
Re: VC Aimbot problem.
« Reply #3 on: June 27, 2008, 02:54:34 pm »
Okay, Medic so far so good.  Thanks for the help.

I fixed everything up.

Now I have the bot aiming at the player in all quadrants, and snapping when in FOV.

I thought I reversed the correct ray intersection function - COL_GETLINECOLLISION, but it doesn't seem to do what I need.

Are there any ways to speed up manually reversing each line/ray intersection export for a "good" one?

Also, I noticed in logs.dll an export int __cdecl COM_MSHDEF_XLoadData(c_ske_skelet *, LPCSTR lpText).  Reverse c_ske_skelet * = bone based aimbot yeah?

MrMedic

  • Moderator
  • MasstKer
  • *
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: VC Aimbot problem.
« Reply #4 on: June 27, 2008, 03:42:49 pm »
sent you a pm explaining it...
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157