ok, first ETQW post here, more to follow :-)
the main calculation is done by idLib as it can be done in every idgame or others as long you implement idLib
please note that im writing the output angles directly into etqw.exe's memory to avoid any clamping.
PHP Code:
void mAim::AimTo( idVec3 to )
{
idVec3 deltaVector;
idAngles deltaAngles;
float *pitch = (float*)(DW_etqwexebase+0x3FF704);
float *yaw = (float*)(DW_etqwexebase+0x3FF708);
deltaVector = to - gameLocal->GetLocalPlayer()->firstPersonViewOrigin;
deltaAngles = deltaVector.ToAngles() - gameLocal->GetLocalPlayer()->firstPersonViewAxis.ToAngles();
deltaAngles.Normalize180();
idAngles endAngles(*pitch,*yaw,0);
endAngles+=deltaAngles;
endAngles.Normalize180();
*pitch=eAngles.pitch;
*yaw=eAngles.yaw;
}
FSH