L L4D2node

CMultiPlayerAnimState::ResetGestureSlot

0x0046aaf0 · 397 bytes · __thiscall

_ZN21CMultiPlayerAnimState16ResetGestureSlotEi

Decompiled

undefined (2 params)

/* CMultiPlayerAnimState::ResetGestureSlot(int) */

void __thiscall CMultiPlayerAnimState::ResetGestureSlot(CMultiPlayerAnimState *this,int param_1)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  CBaseEdict *pCVar4;
  int iVar5;
  int iVar6;
  
  puVar1 = (undefined4 *)(*(int *)(this + 8) + param_1 * 0x18);
  if (puVar1 != (undefined4 *)0x0) {
    if (*(char *)((int)puVar1 + 10) != '\0') {
      (**(code **)(*(int *)this + 0x2c))(this,param_1);
    }
    iVar6 = puVar1[5];
    *puVar1 = 0xffffffff;
    puVar1[1] = 0xffffffff;
    *(undefined1 *)(puVar1 + 2) = 0;
    *(undefined1 *)((int)puVar1 + 9) = 0;
    *(undefined1 *)((int)puVar1 + 10) = 0;
    puVar1[3] = 0;
    puVar1[4] = 0;
    if (iVar6 != 0) {
      if (*(int *)(iVar6 + 0x3c) != 0xf) {
        iVar3 = *(int *)(iVar6 + 0x48);
        if (iVar3 != 0) {
          if (*(char *)(iVar3 + 0x6c) == '\0') {
            pCVar4 = *(CBaseEdict **)(iVar3 + 0x30);
            if (pCVar4 != (CBaseEdict *)0x0) {
              *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
              iVar5 = CBaseEdict::GetChangeAccessor(pCVar4);
              *(undefined2 *)(iVar5 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
          }
          uVar2 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar3 + 0x78) = 0;
          *(undefined4 *)(iVar3 + 0x74) = uVar2;
        }
        *(undefined4 *)(iVar6 + 0x3c) = 0xf;
        iVar6 = puVar1[5];
      }
      if (*(int *)(iVar6 + 8) != 0) {
        iVar3 = *(int *)(iVar6 + 0x48);
        if (iVar3 != 0) {
          if (*(char *)(iVar3 + 0x6c) == '\0') {
            pCVar4 = *(CBaseEdict **)(iVar3 + 0x30);
            if (pCVar4 != (CBaseEdict *)0x0) {
              *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
              iVar5 = CBaseEdict::GetChangeAccessor(pCVar4);
              *(undefined2 *)(iVar5 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
          }
          uVar2 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar3 + 0x78) = 0;
          *(undefined4 *)(iVar3 + 0x74) = uVar2;
        }
        *(undefined4 *)(iVar6 + 8) = 0;
        iVar6 = puVar1[5];
      }
      if (*(float *)(iVar6 + 0x14) != 0.0) {
        iVar3 = *(int *)(iVar6 + 0x48);
        if (iVar3 != 0) {
          if (*(char *)(iVar3 + 0x6c) == '\0') {
            pCVar4 = *(CBaseEdict **)(iVar3 + 0x30);
            if (pCVar4 != (CBaseEdict *)0x0) {
              *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
              iVar5 = CBaseEdict::GetChangeAccessor(pCVar4);
              *(undefined2 *)(iVar5 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
          }
          uVar2 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar3 + 0x78) = 0;
          *(undefined4 *)(iVar3 + 0x74) = uVar2;
        }
        *(undefined4 *)(iVar6 + 0x14) = 0;
        return;
      }
    }
  }
  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)