For some reason i cant get GetPlayerTag working for bones other than 'j_head' and 'j_helmet'.
I decompiled the function:
Code:
int CEngine::GetPlayerTag ( unsigned short TagName, centity_t* Entity, CVector* Vector )
{
BYTE dwCall_Arg1 = *(BYTE*) ((DWORD)Entity + 0x4);
DWORD dwCall_Arg2 = *(DWORD *)((DWORD)Entity + 0x1E8);
if (Entity->EntType == 1 )
{
DWORD dwCall = 0x5B5B70;
DWORD dwCall2 = 0x7A0BF0;
DWORD dwCall3 = 0x59E480;
BYTE v8;
_asm
{
push dwCall_Arg2
push dwCall_Arg1
call dwCall
mov v8, al
mov eax, Entity
call dwCall2
push v8
push eax
push Vector
push TagName
push Entity
call dwCall3
add esp,0x1C
}
}
else
{
DWORD dwCall4 = 0x616BB0;
DWORD dwCall5 = 0x426CA0;
_asm
{
push dwCall_Arg1
push dwCall_Arg2
call dwCall4
push Entity
push eax
push TagName
push Vector
call dwCall5
add esp, 0x18
}
}
And i noticed it comes from calling 0x59e480 , where it actually check whether the bone is anything other than j_head or j_helmet, and if it is, it gives you that
'CachedTag_GetTagPos:' error.. seems like its not allowing you to get the position of anything other than head or helmet. o.0.
I tried just skipping the ent check but that just gives a fatal error..
Credits:
|KungFUPenguin|