L L4D2node

CPoseController::BuildPoseIndexList

0x004958b0 · 338 bytes · __thiscall

_ZN15CPoseController18BuildPoseIndexListEv

Decompiled

undefined (1 param)

/* CPoseController::BuildPoseIndexList() */

void __thiscall CPoseController::BuildPoseIndexList(CPoseController *this)

{
  CBaseEdict *this_00;
  CBaseAnimating *this_01;
  uint uVar1;
  int iVar2;
  CStudioHdr *pCVar3;
  CStudioHdr *pCVar4;
  undefined *puVar5;
  char *pcVar6;
  CPoseController *pCVar7;
  CPoseController *pCVar8;
  
  pCVar8 = this + 0x450;
  pCVar7 = this;
  do {
    uVar1 = *(uint *)(pCVar7 + 0x440);
    if ((((uVar1 != 0xffffffff) &&
         (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
       ((*(int *)(puVar5 + 4) != 0 &&
        (this_01 = (CBaseAnimating *)
                   __dynamic_cast(*(int *)(puVar5 + 4),&CBaseEntity::typeinfo,
                                  &CBaseAnimating::typeinfo,0), this_01 != (CBaseAnimating *)0x0))))
    {
      pcVar6 = *(char **)(this + 0x45c);
      if (pcVar6 == (char *)0x0) {
        pcVar6 = "";
      }
      pCVar3 = *(CStudioHdr **)(this_01 + 0x13e0);
      if (pCVar3 == (CStudioHdr *)0x0) {
        iVar2 = CBaseEntity::GetModel((CBaseEntity *)this_01);
        if (iVar2 == 0) {
          pCVar3 = *(CStudioHdr **)(this_01 + 0x13e0);
        }
        else {
          CBaseAnimating::LockStudioHdr(this_01);
          pCVar3 = *(CStudioHdr **)(this_01 + 0x13e0);
        }
        pCVar4 = (CStudioHdr *)0x0;
        if (pCVar3 != (CStudioHdr *)0x0) goto LAB_0049595a;
      }
      else {
LAB_0049595a:
        pCVar4 = (CStudioHdr *)0x0;
        if (*(int *)pCVar3 != 0) {
          pCVar4 = pCVar3;
        }
      }
      uVar1 = CBaseAnimating::LookupPoseParameter(this_01,pCVar4,pcVar6);
      if (uVar1 == 0xffffffff) {
        uVar1 = 0x18;
      }
      if (((byte)*pCVar8 != uVar1) && (*pCVar8 != SUB41(uVar1,0))) {
        if (this[0x6c] == (CPoseController)0x0) {
          this_00 = *(CBaseEdict **)(this + 0x30);
          if (this_00 != (CBaseEdict *)0x0) {
            *(uint *)this_00 = *(uint *)this_00 | 0x101;
            iVar2 = CBaseEdict::GetChangeAccessor(this_00);
            *(undefined2 *)(iVar2 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CPoseController)((byte)this[0x70] | 1);
        }
        *pCVar8 = SUB41(uVar1,0);
      }
    }
    pCVar7 = pCVar7 + 4;
    pCVar8 = pCVar8 + 1;
    if (pCVar7 == this + 0x10) {
      return;
    }
  } while( true );
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)