L L4D2node

studiohdr_t::CopyAutoplaySequences

0x0059d050 · 97 bytes · __thiscall

_ZNK11studiohdr_t21CopyAutoplaySequencesEPti

Decompiled

undefined (3 params)

/* studiohdr_t::CopyAutoplaySequences(unsigned short*, int) const */

int __thiscall studiohdr_t::CopyAutoplaySequences(studiohdr_t *this,ushort *param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar3 = 0;
  iVar2 = 0;
  while( true ) {
    if (*(int *)(this + 0x150) == 0) {
      iVar1 = *(int *)(this + 0xbc);
    }
    else {
      iVar1 = GetVirtualModel(this);
      iVar1 = *(int *)(iVar1 + 0x14);
    }
    if ((iVar1 <= iVar2) || (param_2 <= iVar3)) break;
    iVar1 = pSeqdesc(this,iVar2);
    if ((*(byte *)(iVar1 + 0xc) & 8) != 0) {
      param_1[iVar3] = (ushort)iVar2;
      iVar3 = iVar3 + 1;
    }
    iVar2 = iVar2 + 1;
  }
  return iVar3;
}

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)