L L4D2node

CChoreoScene::FindTagByName

0x00bb20e0 · 261 bytes · __thiscall

_ZN12CChoreoScene13FindTagByNameEPKcS1_

Decompiled

undefined (3 params)

/* CChoreoScene::FindTagByName(char const*, char const*) */

int __thiscall CChoreoScene::FindTagByName(CChoreoScene *this,char *param_1,char *param_2)

{
  CChoreoActor *this_00;
  int iVar1;
  CChoreoChannel *this_01;
  int iVar2;
  CChoreoEvent *this_02;
  char *pcVar3;
  int local_28;
  int local_20;
  
  local_28 = 0;
  if (0 < *(int *)(this + 0x24)) {
    do {
      this_00 = *(CChoreoActor **)(*(int *)(this + 0x18) + local_28 * 4);
      if (this_00 != (CChoreoActor *)0x0) {
        local_20 = 0;
        iVar1 = CChoreoActor::GetNumChannels(this_00);
        if (0 < iVar1) {
          do {
            this_01 = (CChoreoChannel *)CChoreoActor::GetChannel(this_00,local_20);
            if (this_01 != (CChoreoChannel *)0x0) {
              iVar1 = 0;
              while( true ) {
                iVar2 = CChoreoChannel::GetNumEvents(this_01);
                if (iVar2 <= iVar1) break;
                this_02 = (CChoreoEvent *)CChoreoChannel::GetEvent(this_01,iVar1);
                if (this_02 != (CChoreoEvent *)0x0) {
                  iVar2 = CChoreoEvent::GetType(this_02);
                  if (iVar2 == 5) {
                    pcVar3 = (char *)CChoreoEvent::GetParameters(this_02);
                    pcVar3 = strstr(pcVar3,param_1);
                    if (pcVar3 != (char *)0x0) {
                      iVar2 = CChoreoEvent::FindRelativeTag(this_02,param_2);
                      if (iVar2 != 0) {
                        return iVar2;
                      }
                    }
                  }
                }
                iVar1 = iVar1 + 1;
              }
            }
            local_20 = local_20 + 1;
            iVar1 = CChoreoActor::GetNumChannels(this_00);
          } while (local_20 < iVar1);
        }
      }
      local_28 = local_28 + 1;
    } while (local_28 < *(int *)(this + 0x24));
  }
  return 0;
}

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)