L L4D2node

CMultiPlayerAnimState::InitGestureSlots

0x0046db40 · 231 bytes · __thiscall

_ZN21CMultiPlayerAnimState16InitGestureSlotsEv

Decompiled

undefined (1 param)

/* CMultiPlayerAnimState::InitGestureSlots() */

undefined4 __thiscall CMultiPlayerAnimState::InitGestureSlots(CMultiPlayerAnimState *this)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  CBaseAnimatingOverlay *local_24;
  
  local_24 = *(CBaseAnimatingOverlay **)(this + 0x1c);
  if (local_24 == (CBaseAnimatingOverlay *)0x0) {
    local_24 = (CBaseAnimatingOverlay *)0x0;
  }
  else {
    CBaseAnimatingOverlay::SetNumAnimOverlays(local_24,7);
  }
  iVar3 = *(int *)(this + 0x14);
  CUtlVector<GestureSlot_t,CUtlMemory<GestureSlot_t,int>>::GrowVector
            ((CUtlVector<GestureSlot_t,CUtlMemory<GestureSlot_t,int>> *)(this + 8),7);
  iVar1 = (*(int *)(this + 0x14) - iVar3) + -7;
  if (0 < iVar1) {
    iVar3 = iVar3 * 0x18;
    _V_memmove((void *)(*(int *)(this + 8) + 0xa8 + iVar3),(void *)(*(int *)(this + 8) + iVar3),
               iVar1 * 0x18);
  }
  iVar1 = 0;
  iVar3 = 0;
  do {
    iVar4 = *(int *)(this + 8);
    uVar2 = CBaseAnimatingOverlay::GetAnimOverlay(local_24,iVar3);
    *(undefined4 *)(iVar4 + iVar1 + 0x14) = uVar2;
    if (*(int *)(*(int *)(this + 8) + iVar1 + 0x14) == 0) {
      return 0;
    }
    *(undefined1 *)(*(int *)(this + 8) + iVar1 + 10) = 0;
    iVar1 = iVar1 + 0x18;
    iVar4 = iVar3 + 1;
    ResetGestureSlot(this,iVar3);
    iVar3 = iVar4;
  } while (iVar4 != 7);
  return 1;
}

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)