Just thought I'd share some cool stuff I found while updating my JKA MovieBattles mod client hook.
JKA uses the ghoul2 system that sof2 uses for bone animations (ragdoll and stuff).
As such, you can use bone positions for aimbot, instead of just using the entities->lerpOrigin.
To grab the bone data you just need to make a call to the ghoul2 api, passing in the ghoul2* that is a member of centities[player].
Now bOrg contains the position of the chest bone (rotated and translated to world coords).
int boneNum = 2;
trap_G2API_GetBoltMatrix(mycents[lastent]->ghoul2, 0, boneNum, &matrix,
mycg->time, mycgs->gameModels, mycents[lastent]->modelScale);
BG_GiveMeVectorFromMatrix(&matrix, ORIGIN, bOrg);
boneNum is 2, which is the chest on all models i tested it on.
There are other bones, and to find out which bones are which, you can easily check CG_G2_ADDBOLT in syscall. The code I used for this is:
The above shows you which bones are which numbers, pretty self evident.
void* ghoul2 = (void*)arg;
int modelIndex = (int)arg;
const char* boneName = (const char*)arg;
int retVal = syscall(CG_G2_ADDBOLT, ghoul2, modelIndex, boneName);
OutputDebugString(va("CG_G2_ADDBOLT(%i,%i,%s) = %i",ghoul2,modelIndex,boneName,retVal));
Hope this helps anyone still interested in jka (or sof2).