fat and big head mode

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论fat and big head mode
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

fat and big head mode

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-03 0

int iModelIndexAlreadyFat[512];
int iModelsMadeFat = 0;

void _cdecl hookStudioDrawPoints(void)
{
    int i, j, k;
    mstudiobodyparts_t *pBodyPart;
    mstudiomodel_t *pSubModel;
    model_t *pModel;
    studiohdr_t *pStudioHeader;
    byte *pvertbone;
    Vector *pstudioverts;
    cl_entity_t *pEnt;

    pEnt = pEngstudio->GetCurrentEntity(); // get the ent currently being rendered
    pModel = pEngstudio->SetupPlayerModel(pEnt->index); // then get the model of that ent
    pStudioHeader = (studiohdr_t*)pEngstudio->Mod_Extradata(pModel); // ...and the header of that model's data
// then use the header to find the address of the first body part in the model data
pBodyPart = (mstudiobodyparts_t*)((byte*)pStudioHeader + pStudioHeader->bodypartindex);

// check this model hasn't already been made into a fatty -- simple and ugly pointer comparison that can easily be improved
    for(i = 0; i < iModelsMadeFat; i++)
    {
        if(iModelIndexAlreadyFat == (int)pStudioHeader)
        {
            oEngstudio.StudioDrawPoints();
            return;
        }
    }

    if(iModelsMadeFat >= 512)
    {
        oEngstudio.StudioDrawPoints();
        return;
    }

    add_log("making model with pointer %x big-headed!", pStudioHeader);
    iModelIndexAlreadyFat[iModelsMadeFat] = (int)pStudioHeader;
    iModelsMadeFat++;

    for(k = 0; k < pStudioHeader->numbodyparts; k++) // loop through all bodyparts of the model...
    {
        pSubModel = (mstudiomodel_t*)((byte*)pStudioHeader + pBodyPart[k].modelindex);
        for(i = 0; i < pBodyPart[k].nummodels; i++) // ...and all submodels of the bodyparts
        {
            pstudioverts = (Vector*)((byte*)pStudioHeader + pSubModel.vertindex);
            for(j = 0; j < pSubModel.numverts; j++)  // ...and all vertices in the submodel
            {
                pvertbone = ((byte*)pStudioHeader + pSubModel.vertinfoindex);
                if(pvertbone[j] == 7) // if this vertex is attached to the head bone (bighead only, remove this check for fatboy)...
                {
                    pstudioverts[j] = pstudioverts[j] * 3.0f; // make all the vertices in the head 3x as far away from the head bone
                }
            }
        }
    }

    oEngstudio.StudioDrawPoints();
}

密码被盗,请联系cscheat取回
« 返回列表
发帖 回复