L L4D2node

CSequenceTransitioner::CheckForSequenceChange

0x004ae710 · 383 bytes · __thiscall

_ZN21CSequenceTransitioner22CheckForSequenceChangeEP10CStudioHdribb

Decompiled

undefined (5 params)

/* CSequenceTransitioner::CheckForSequenceChange(CStudioHdr*, int, bool, bool) */

void __thiscall
CSequenceTransitioner::CheckForSequenceChange
          (CSequenceTransitioner *this,CStudioHdr *param_1,int param_2,bool param_3,bool param_4)

{
  undefined4 uVar1;
  CBaseEdict *this_00;
  int iVar2;
  int iVar3;
  int iVar4;
  float fVar5;
  
  if (param_1 != (CStudioHdr *)0x0) {
    iVar2 = *(int *)(this + 0xc);
    if (iVar2 == 0) {
      CUtlVector<CAnimationLayer,CUtlMemory<CAnimationLayer,int>>::InsertBefore
                ((CUtlVector<CAnimationLayer,CUtlMemory<CAnimationLayer,int>> *)this,0);
      iVar2 = *(int *)(this + 0xc);
    }
    iVar4 = (iVar2 + -1) * 0x4c + *(int *)this;
    iVar2 = *(int *)(iVar4 + 8);
    if ((*(float *)(iVar4 + 0x2c) != 0.0) &&
       ((param_2 != *(int *)(iVar4 + 8) || (iVar2 = param_2, param_3)))) {
      if ((param_2 < 0) ||
         (((iVar2 = CStudioHdr::GetNumSeq(param_1), iVar2 <= param_2 ||
           (iVar2 = CStudioHdr::pSeqdesc(param_1,param_2), (*(byte *)(iVar2 + 0xc) & 2) != 0)) ||
          (!param_4)))) {
        *(undefined4 *)(this + 0xc) = 0;
        iVar2 = 0;
      }
      else {
        iVar3 = CStudioHdr::pSeqdesc(param_1,*(int *)(iVar4 + 8));
        fVar5 = *(float *)(iVar2 + 0x68);
        if (*(float *)(iVar3 + 0x6c) <= *(float *)(iVar2 + 0x68)) {
          fVar5 = *(float *)(iVar3 + 0x6c);
        }
        *(float *)(iVar4 + 0x30) = fVar5;
        iVar2 = *(int *)(this + 0xc);
      }
      CUtlVector<CAnimationLayer,CUtlMemory<CAnimationLayer,int>>::InsertBefore
                ((CUtlVector<CAnimationLayer,CUtlMemory<CAnimationLayer,int>> *)this,iVar2);
      iVar4 = (*(int *)(this + 0xc) + -1) * 0x4c + *(int *)this;
      iVar2 = *(int *)(iVar4 + 8);
    }
    if (iVar2 != -1) {
      iVar2 = *(int *)(iVar4 + 0x48);
      if (iVar2 != 0) {
        if (*(char *)(iVar2 + 0x6c) == '\0') {
          this_00 = *(CBaseEdict **)(iVar2 + 0x30);
          if (this_00 != (CBaseEdict *)0x0) {
            *(uint *)this_00 = *(uint *)this_00 | 0x101;
            iVar3 = CBaseEdict::GetChangeAccessor(this_00);
            *(undefined2 *)(iVar3 + 2) = 0;
          }
        }
        else {
          *(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
        }
        uVar1 = *(undefined4 *)(gpGlobals + 0xc);
        *(undefined4 *)(iVar2 + 0x78) = 0;
        *(undefined4 *)(iVar2 + 0x74) = uVar1;
      }
      *(undefined4 *)(iVar4 + 8) = 0xffffffff;
    }
    *(undefined4 *)(iVar4 + 0x2c) = 0;
    *(undefined4 *)(iVar4 + 0x30) = 0;
  }
  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)