L L4D2node

CMultiPlayerAnimState::AddToGestureSlot

0x0046adf0 · 851 bytes · __thiscall

_ZN21CMultiPlayerAnimState16AddToGestureSlotEi8Activityibb

Decompiled

undefined (6 params)

/* CMultiPlayerAnimState::AddToGestureSlot(int, Activity, int, bool, bool) */

void __thiscall
CMultiPlayerAnimState::AddToGestureSlot
          (CMultiPlayerAnimState *this,int param_1,undefined4 param_3,int param_4,undefined1 param_5
          ,char param_6)

{
  undefined4 uVar1;
  CBaseEdict *pCVar2;
  uint *puVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  
  if (*(int *)(this + 0x1c) != 0) {
    iVar7 = param_1 * 0x18;
    if (((int *)(*(int *)(this + 8) + iVar7))[5] != 0) {
      *(int *)(*(int *)(this + 8) + iVar7) = param_1;
      *(undefined4 *)(*(int *)(this + 8) + 4 + iVar7) = param_3;
      *(char *)(*(int *)(this + 8) + 8 + iVar7) = param_6;
      *(undefined1 *)(*(int *)(this + 8) + 9 + iVar7) = param_5;
      *(undefined1 *)(*(int *)(this + 8) + 10 + iVar7) = 1;
      *(undefined4 *)(*(int *)(this + 8) + 0xc + iVar7) = 0;
      *(undefined4 *)(*(int *)(this + 8) + 0x10 + iVar7) = 0;
      *(undefined4 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 0x34) = param_3;
      iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      if (*(int *)(iVar6 + 0x3c) != param_1) {
        iVar5 = *(int *)(iVar6 + 0x48);
        if (iVar5 != 0) {
          if (*(char *)(iVar5 + 0x6c) == '\0') {
            pCVar2 = *(CBaseEdict **)(iVar5 + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
          }
          uVar1 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar5 + 0x78) = 0;
          *(undefined4 *)(iVar5 + 0x74) = uVar1;
        }
        *(int *)(iVar6 + 0x3c) = param_1;
        iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      }
      *(undefined4 *)(iVar6 + 0x38) = 0;
      iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      if (*(float *)(iVar6 + 0xc) != 0.0) {
        iVar5 = *(int *)(iVar6 + 0x48);
        if (iVar5 != 0) {
          if (*(char *)(iVar5 + 0x6c) == '\0') {
            pCVar2 = *(CBaseEdict **)(iVar5 + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
          }
          uVar1 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar5 + 0x78) = 0;
          *(undefined4 *)(iVar5 + 0x74) = uVar1;
        }
        *(undefined4 *)(iVar6 + 0xc) = 0;
        iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      }
      if (*(float *)(iVar6 + 0x10) != 0.0) {
        iVar5 = *(int *)(iVar6 + 0x48);
        if (iVar5 != 0) {
          if (*(char *)(iVar5 + 0x6c) == '\0') {
            pCVar2 = *(CBaseEdict **)(iVar5 + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
          }
          uVar1 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar5 + 0x78) = 0;
          *(undefined4 *)(iVar5 + 0x74) = uVar1;
        }
        *(undefined4 *)(iVar6 + 0x10) = 0;
        iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      }
      *(undefined4 *)(iVar6 + 0x18) = 0x3f800000;
      *(undefined4 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 0x34) = param_3;
      iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      if (param_4 != *(int *)(iVar6 + 8)) {
        iVar5 = *(int *)(iVar6 + 0x48);
        if (iVar5 != 0) {
          if (*(char *)(iVar5 + 0x6c) == '\0') {
            pCVar2 = *(CBaseEdict **)(iVar5 + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
          }
          uVar1 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar5 + 0x78) = 0;
          *(undefined4 *)(iVar5 + 0x74) = uVar1;
        }
        *(int *)(iVar6 + 8) = param_4;
        iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      }
      iVar5 = gpGlobals;
      if (*(float *)(iVar6 + 0x14) != 1.0) {
        iVar4 = *(int *)(iVar6 + 0x48);
        if (iVar4 != 0) {
          if (*(char *)(iVar4 + 0x6c) == '\0') {
            pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar5 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
          }
          iVar5 = gpGlobals;
          uVar1 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar4 + 0x78) = 0;
          *(undefined4 *)(iVar4 + 0x74) = uVar1;
        }
        *(undefined4 *)(iVar6 + 0x14) = 0x3f800000;
        iVar6 = *(int *)(*(int *)(this + 8) + 0x14 + iVar7);
      }
      *(undefined4 *)(iVar6 + 0x1c) = 0;
      *(undefined4 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 0x20) = 0;
      *(undefined1 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 4) = 0;
      *(undefined4 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 0x40) = 0;
      *(undefined4 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 0x40) =
           *(undefined4 *)(iVar5 + 0xc);
      *(undefined1 *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar7) + 5) = 0;
      puVar3 = *(uint **)(*(int *)(this + 8) + 0x14 + iVar7);
      if (param_6 == '\0') {
        *puVar3 = *puVar3 & 0xfffffffd;
      }
      else {
        *puVar3 = *puVar3 | 2;
      }
      puVar3 = *(uint **)(*(int *)(this + 8) + 0x14 + iVar7);
      *puVar3 = *puVar3 | 1;
    }
  }
  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)