1. Pinoy Hideout is the Ultimate Pinoy Chat, Mobile and PC Community
    We have been leading the scene for over 7 years and currently offer:
    • latest and updated game cheats and softwares
    • internet tricks for your android phone, mobile network, and computer
    • a staff team who helps protect its members from malware while enforcing a great community

    • You must register an account before you can post, download files, and see any advanced features or content.

  2. How to avail PHO VIP hack/s?
    Click here for more Info!
    [PHO] VIP Hacks Price

      SF1 VIP|ROS VIP

    • 7 Days = php 150
    • 15 Days = php 200
    • 1 Month = php 300

      SF2 VIP

    • 7 Days = php 200
    • 15 Days = php 250
    • 1 Month = php 500
    Dismiss Notice
Dismiss Notice
Announcement!
Gusto mo bang makakuha ng VIP subcription ng libre? CLICK HERE<

Source Rules of Survival GetBoneByObject

Discussion in 'C and C++' started by zNova, Oct 23, 2019.

  1. zNova

    zNova Member
    Staff Member Moderator

    Reputations:
    60
    Joined:
    Feb 24, 2019
    Posts:
    37
    Likes Received:
    11
    Trophy Points:
    8

    Somehow linked with modelfactory but this one uses "all" object as its base.
    Code:
    class ModelData
    {
    public:
        char pad_0000[0x24];
        __int32 count;
        char* modeltype;
        char pad_hehe[0x129C];
        D3DXMATRIX* m_Transform;
    };
    
    class Object
    {
    public:
        char pad_0000[0x368];
        D3DXVECTOR3 Pos;
        char pad_0001[0x1D68];
        D3DXMATRIX Bone;
        ModelData* pData;
    };
    
    class LinkList
    {
    public:
        std::vector<Object*> entities;
    };
    
    bool GetBoneByObject(Object* pObject, D3DXVECTOR3& Out, int index)
    {
        if (pObject)
        {
            D3DXMatrixMultiply(&pObject->Bone, &pObject->Bone, pObject->pData->m_Transform);
            pObject->Bone = pObject->pData->m_Transform[index];
            if (!D3DXMatrixIsIdentity(&pObject->Bone))
            {
                Out = D3DXVECTOR3(pObject->Bone._41, pObject->Bone._42, pObject->Bone._43);
                return true;
            }
            return false;
        }
    }
    Example Loop:
    Code:
    for (size_t i = 0 ; i < pLink->entities.size(); i++)
            {
                Object* pModel = pLink->entities.at(i);
                if (pModel)
                {
                    
                    if (pModel->pData->count != -1)//Index of zero is still valid
                    {
                        if (isSkeletal(pModel->pData->modeltype))//Could be male/female
                        {
                            D3DXVECTOR3 Out,vScreen;
                            if (GetBoneByObject(pModel, Out, 17) && pScene->Inst()->GetView()->W2S(&Out,vScreen))//Log the bone count yourself :D
                            {
                                //Do something
                            }
                        }
                    }
                }
            }
     

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Share This Page

Pinoy Hideout