L L4D2node

CChoreoEvent::AddAbsoluteTag

0x00baa450 · 560 bytes · __thiscall

_ZN12CChoreoEvent14AddAbsoluteTagENS_10AbsTagTypeEPKcf

Decompiled

undefined (4 params)

/* CChoreoEvent::AddAbsoluteTag(CChoreoEvent::AbsTagType, char const*, float) */

void __thiscall
CChoreoEvent::AddAbsoluteTag(CChoreoEvent *this,int param_2,char *param_3,float param_4)

{
  CUtlString *this_00;
  CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>> *this_01;
  CUtlString CVar1;
  CUtlString CVar2;
  int iVar3;
  byte bVar4;
  byte bVar5;
  CUtlString *this_02;
  int local_70;
  int local_6c;
  int local_64;
  int local_60;
  CEventAbsoluteTag local_54 [28];
  CEventAbsoluteTag local_38 [16];
  undefined4 local_28;
  byte local_24;
  undefined4 local_20;
  
  CEventAbsoluteTag::CEventAbsoluteTag(local_54,this,param_3,param_4);
  this_01 = (CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>> *)
            (this + param_2 * 0x14 + 0xe4);
                    /* try { // try from 00baa49b to 00baa4c2 has its CatchHandler @ 00baa680 */
  CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>>::InsertBefore
            (this_01,*(int *)(this_01 + 0xc),local_54);
  CEventAbsoluteTag::CEventAbsoluteTag(local_38,(CChoreoEvent *)0x1,"",0.0);
  iVar3 = *(int *)(this_01 + 0xc);
  local_6c = 0;
  local_70 = 0x1c;
  if (0 < iVar3) {
    do {
      local_6c = local_6c + 1;
      if (local_6c < iVar3) {
        local_64 = local_70;
        local_60 = local_6c;
        do {
          while( true ) {
            this_00 = (CUtlString *)(*(int *)this_01 + local_70 + -0x1c);
            this_02 = (CUtlString *)(*(int *)this_01 + local_64);
            if (*(float *)(this_00 + 0x10) < *(float *)(this_02 + 0x10) ||
                *(float *)(this_00 + 0x10) == *(float *)(this_02 + 0x10)) break;
                    /* try { // try from 00baa531 to 00baa5f0 has its CatchHandler @ 00baa695 */
            CUtlString::operator=((CUtlString *)local_38,this_00);
            local_28 = *(undefined4 *)(this_00 + 0x10);
            local_24 = local_24 & 0xf0 | (byte)this_00[0x14] & 1 | (byte)this_00[0x14] & 2 |
                       (byte)this_00[0x14] & 4 | (byte)this_00[0x14] & 8;
            local_20 = *(undefined4 *)(this_00 + 0x18);
            CUtlString::operator=(this_00,this_02);
            CVar1 = this_00[0x14];
            *(undefined4 *)(this_00 + 0x10) = *(undefined4 *)(this_02 + 0x10);
            bVar4 = (byte)this_02[0x14] & 1;
            this_00[0x14] = (CUtlString)((byte)CVar1 & 0xfe | bVar4);
            bVar5 = (byte)this_02[0x14] & 2;
            this_00[0x14] = (CUtlString)((byte)CVar1 & 0xfc | bVar4 | bVar5);
            CVar2 = this_02[0x14];
            this_00[0x14] = (CUtlString)((byte)CVar1 & 0xf8 | bVar4 | bVar5 | (byte)CVar2 & 4);
            this_00[0x14] =
                 (CUtlString)
                 ((byte)CVar1 & 0xf0 | bVar4 | bVar5 | (byte)CVar2 & 4 | (byte)this_02[0x14] & 8);
            *(undefined4 *)(this_00 + 0x18) = *(undefined4 *)(this_02 + 0x18);
            CUtlString::operator=(this_02,(CUtlString *)local_38);
            CVar1 = this_02[0x14];
            local_60 = local_60 + 1;
            *(undefined4 *)(this_02 + 0x10) = local_28;
            local_64 = local_64 + 0x1c;
            bVar4 = local_24 & 1;
            this_02[0x14] = (CUtlString)((byte)CVar1 & 0xfe | bVar4);
            bVar5 = local_24 & 2;
            this_02[0x14] = (CUtlString)((byte)CVar1 & 0xfc | bVar4 | bVar5);
            this_02[0x14] = (CUtlString)((byte)CVar1 & 0xf8 | bVar4 | bVar5 | local_24 & 4);
            this_02[0x14] =
                 (CUtlString)((byte)CVar1 & 0xf0 | bVar4 | bVar5 | local_24 & 4 | local_24 & 8);
            *(undefined4 *)(this_02 + 0x18) = local_20;
            iVar3 = *(int *)(this_01 + 0xc);
            if (iVar3 <= local_60) goto LAB_00baa655;
          }
          local_60 = local_60 + 1;
          local_64 = local_64 + 0x1c;
        } while (local_60 < iVar3);
      }
LAB_00baa655:
      local_70 = local_70 + 0x1c;
    } while (local_6c < iVar3);
  }
  CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_38);
  CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_54);
  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)