L L4D2node

CPoseController::BuildPropList

0x00495500 · 896 bytes · __thiscall

_ZN15CPoseController13BuildPropListEv

Decompiled

undefined (1 param)

/* CPoseController::BuildPropList() */

void __thiscall CPoseController::BuildPropList(CPoseController *this)

{
  CBaseEdict *pCVar1;
  uint uVar2;
  char *pcVar3;
  CBaseAnimating *this_00;
  CDynamicProp *this_01;
  undefined4 *puVar4;
  int iVar5;
  CStudioHdr *pCVar6;
  undefined *puVar7;
  CStudioHdr *pCVar8;
  CPoseController *__s1;
  CBaseEntity *local_34;
  int local_30;
  undefined4 local_20 [4];
  
  pcVar3 = "";
  if (*(char **)(this + 0x458) != (char *)0x0) {
    pcVar3 = *(char **)(this + 0x458);
  }
  local_30 = 0;
  local_34 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByName
                       ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar3,(CBaseEntity *)0x0,
                        (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
  if (local_34 != (CBaseEntity *)0x0) {
    local_30 = 0;
    do {
      this_00 = (CBaseAnimating *)
                __dynamic_cast(local_34,&CBaseEntity::typeinfo,&CBaseAnimating::typeinfo,0);
      if (this_00 != (CBaseAnimating *)0x0) {
        this_01 = (CDynamicProp *)
                  __dynamic_cast(this_00,&CBaseAnimating::typeinfo,&CDynamicProp::typeinfo,0);
        if (this_01 != (CDynamicProp *)0x0) {
          CDynamicProp::PropSetSequence(this_01,0);
        }
        uVar2 = *(uint *)(this + local_30 * 4 + 0x440);
        if ((((uVar2 == 0xffffffff) ||
             (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) ||
           (this_00 != *(CBaseAnimating **)(puVar7 + 4))) {
          puVar4 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
          local_20[0] = *puVar4;
          iVar5 = memcmp(this + local_30 * 4 + 0x440,local_20,4);
          if (iVar5 != 0) {
            if (this[0x6c] == (CPoseController)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar5 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CPoseController)((byte)this[0x70] | 1);
            }
            *(undefined4 *)(this + local_30 * 4 + 0x440) = local_20[0];
          }
        }
        pcVar3 = "";
        if (*(char **)(this + 0x45c) != (char *)0x0) {
          pcVar3 = *(char **)(this + 0x45c);
        }
        pCVar6 = *(CStudioHdr **)(this_00 + 0x13e0);
        if (pCVar6 == (CStudioHdr *)0x0) {
          iVar5 = CBaseEntity::GetModel((CBaseEntity *)this_00);
          if (iVar5 == 0) {
            pCVar6 = *(CStudioHdr **)(this_00 + 0x13e0);
          }
          else {
            CBaseAnimating::LockStudioHdr(this_00);
            pCVar6 = *(CStudioHdr **)(this_00 + 0x13e0);
          }
          pCVar8 = (CStudioHdr *)0x0;
          if (pCVar6 != (CStudioHdr *)0x0) goto LAB_00495596;
        }
        else {
LAB_00495596:
          pCVar8 = (CStudioHdr *)0x0;
          if (*(int *)pCVar6 != 0) {
            pCVar8 = pCVar6;
          }
        }
        uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar8,pcVar3);
        if (uVar2 == 0xffffffff) {
          uVar2 = 0x18;
        }
        if (((byte)this[local_30 + 0x450] != uVar2) && (this[local_30 + 0x450] != SUB41(uVar2,0))) {
          if (this[0x6c] == (CPoseController)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar5 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CPoseController)((byte)this[0x70] | 1);
          }
          this[local_30 + 0x450] = SUB41(uVar2,0);
        }
        local_30 = local_30 + 1;
      }
      pcVar3 = "";
      if (*(char **)(this + 0x458) != (char *)0x0) {
        pcVar3 = *(char **)(this + 0x458);
      }
      local_34 = (CBaseEntity *)
                 CGlobalEntityList::FindEntityByName
                           ((CGlobalEntityList *)gEntList,local_34,pcVar3,(CBaseEntity *)0x0,
                            (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
    } while ((local_34 != (CBaseEntity *)0x0) && (local_30 < 4));
    if (3 < local_30) goto LAB_00495833;
  }
  __s1 = this + local_30 * 4 + 0x440;
  do {
    while ((((uVar2 = *(uint *)__s1, uVar2 == 0xffffffff ||
             (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar7 + 4) == 0))) {
LAB_00495798:
      local_30 = local_30 + 1;
      __s1 = __s1 + 4;
      if (3 < local_30) goto LAB_00495833;
    }
    local_20[0] = 0xffffffff;
    iVar5 = memcmp(__s1,local_20,4);
    if (iVar5 == 0) goto LAB_00495798;
    if (this[0x6c] == (CPoseController)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CPoseController)((byte)this[0x70] | 1);
    }
    __s1 = __s1 + 4;
    *(undefined4 *)(this + local_30 * 4 + 0x440) = local_20[0];
    local_30 = local_30 + 1;
  } while (local_30 < 4);
LAB_00495833:
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
  return;
}

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)