L L4D2node

CChoreoScene::DestroyChannel

0x00bb3c70 · 226 bytes · __thiscall

_ZN12CChoreoScene14DestroyChannelEP14CChoreoChannel

Decompiled

undefined (2 params)

/* CChoreoScene::DestroyChannel(CChoreoChannel*) */

void __thiscall CChoreoScene::DestroyChannel(CChoreoScene *this,CChoreoChannel *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  iVar2 = *(int *)(this + 0x38) * 4;
  iVar3 = *(int *)(this + 0x38) + -1;
  if (-1 < iVar3) {
    do {
      piVar1 = (int *)(*(int *)(this + 0x2c) + iVar2 + -4);
      if ((CChoreoChannel *)*piVar1 == param_1) {
        iVar4 = (*(int *)(this + 0x38) - iVar3) + -1;
        if (iVar4 < 1) {
          *(int *)(this + 0x38) = *(int *)(this + 0x38) + -1;
        }
        else {
          _V_memmove(piVar1,(void *)(*(int *)(this + 0x2c) + iVar2),iVar4 * 4);
          *(int *)(this + 0x38) = *(int *)(this + 0x38) + -1;
        }
      }
      iVar3 = iVar3 + -1;
      iVar2 = iVar2 + -4;
    } while (iVar3 != -1);
  }
  if (param_1 == (CChoreoChannel *)0x0) {
    return;
  }
  *(undefined4 *)(param_1 + 0x90) = 0;
  CUtlMemory<CChoreoEvent*,int>::Purge((CUtlMemory<CChoreoEvent*,int> *)(param_1 + 0x84));
  *(undefined4 *)(param_1 + 0x94) = *(undefined4 *)(param_1 + 0x84);
  CUtlMemory<CChoreoEvent*,int>::Purge((CUtlMemory<CChoreoEvent*,int> *)(param_1 + 0x84));
  operator_delete(param_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)