L L4D2node

CChoreoScene::RemoveEventsExceptTypes

0x00bb3a90 · 455 bytes · __thiscall

_ZN12CChoreoScene23RemoveEventsExceptTypesEPii

Decompiled

undefined (3 params)

/* CChoreoScene::RemoveEventsExceptTypes(int*, int) */

void __thiscall CChoreoScene::RemoveEventsExceptTypes(CChoreoScene *this,int *param_1,int param_2)

{
  CChoreoActor *this_00;
  int iVar1;
  CChoreoChannel *this_01;
  CChoreoEvent *pCVar2;
  int iVar3;
  int iVar4;
  int local_30;
  int local_28;
  int local_20;
  
  local_30 = 0;
  if (0 < *(int *)(this + 0x24)) {
    do {
      this_00 = *(CChoreoActor **)(*(int *)(this + 0x18) + local_30 * 4);
      if (this_00 != (CChoreoActor *)0x0) {
        local_28 = 0;
        iVar1 = CChoreoActor::GetNumChannels(this_00);
        if (0 < iVar1) {
          do {
            this_01 = (CChoreoChannel *)CChoreoActor::GetChannel(this_00,local_28);
            if (this_01 != (CChoreoChannel *)0x0) {
              local_20 = CChoreoChannel::GetNumEvents(this_01);
              local_20 = local_20 + -1;
              if (-1 < local_20) {
                do {
                  while (pCVar2 = (CChoreoEvent *)CChoreoChannel::GetEvent(this_01,local_20),
                        pCVar2 == (CChoreoEvent *)0x0) {
LAB_00bb3b59:
                    local_20 = local_20 + -1;
                    if (local_20 == -1) goto LAB_00bb3b63;
                  }
                  if (0 < param_2) {
                    iVar1 = 0;
                    do {
                      iVar3 = CChoreoEvent::GetType(pCVar2);
                      if (iVar3 == param_1[iVar1]) goto LAB_00bb3b59;
                      iVar1 = iVar1 + 1;
                    } while (iVar1 != param_2);
                  }
                  CChoreoChannel::RemoveEvent(this_01,pCVar2);
                  DeleteReferencedObjects(this,pCVar2);
                  local_20 = local_20 + -1;
                } while (local_20 != -1);
              }
            }
LAB_00bb3b63:
            local_28 = local_28 + 1;
            iVar1 = CChoreoActor::GetNumChannels(this_00);
          } while (local_28 < iVar1);
        }
      }
      local_30 = local_30 + 1;
    } while (local_30 < *(int *)(this + 0x24));
  }
  local_20 = *(int *)(this + 0x10) + -1;
  iVar1 = local_20 * 4;
  if (-1 < local_20) {
    do {
      pCVar2 = *(CChoreoEvent **)(*(int *)(this + 4) + iVar1);
      iVar3 = CChoreoEvent::GetActor(pCVar2);
      if (iVar3 == 0) {
        if (0 < param_2) {
          iVar3 = 0;
          do {
            iVar4 = CChoreoEvent::GetType(pCVar2);
            if (iVar4 == param_1[iVar3]) goto joined_r0x00bb3c0b;
            iVar3 = iVar3 + 1;
          } while (iVar3 != param_2);
        }
        DeleteReferencedObjects(this,pCVar2);
      }
joined_r0x00bb3c0b:
      iVar1 = iVar1 + -4;
      local_20 = local_20 + -1;
    } while (local_20 != -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)