lundi 10 mars 2014

[Help] Reading bone internal crash :-( topic




Hello i've been trying to draw/get bone pos, in my internal hack but it always crash :/
(i tried on my overlay and it does work so my offset are right)
note : this is on an emu.

Here is my code actually :


Code:


//getting Skeleton and bone coeff from Cplayer class
D3DXMATRIX GetCoeff( void)
        {
                return *(D3DXMATRIX*)( ( DWORD )( this ) + 0xF84 );
        }
        CSkeleton* getSkeleton( void )
    {
        return ( CSkeleton* )( ( DWORD )( this ) + 0xDB4 );
    }


Getting my bones pos :

Code:


D3DXVECTOR3 CEngine::GetBonePos(CPlayer *pPlayer, INT i)
{
       
        CSkeleton * m_Skeleton = pPlayer->getSkeleton();

        if ( !VALID( pPlayer ) || !VALID( m_Skeleton )  )
                return D3DXVECTOR3( 0, 0, 0 );

        if ( !VALID( m_Skeleton->BonePtr ) )
                return D3DXVECTOR3( 0, 0, 0 );
       
        D3DXVECTOR3 Pos;
        D3DXMATRIX v6, v7, BoneMatrix;
        D3DXMATRIX BoneCoeff;

        D3DXMatrixRotationYawPitchRoll( &v6, 0.0, 1.570796251296997, 0.0 );
        BoneMatrix = m_Skeleton->BonePtr->pBones[i].BoneMatrix;


        BoneCoeff = pPlayer->GetCoeff();
        D3DXMatrixMultiply( &BoneMatrix, &BoneMatrix, &BoneCoeff );
        D3DXMatrixMultiply( &v7, &v6, &BoneMatrix );

        Pos.x = v7._41;
        Pos.y = v7._42;
        Pos.z = v7._43;

        return Pos;
}


if any of you could help :S





Aucun commentaire:

Enregistrer un commentaire