L L4D2node

CChoreoScene::operator=

0x00bb72e0 · 1324 bytes · __thiscall

_ZN12CChoreoSceneaSERKS_

Decompiled

undefined (2 params)

/* CChoreoScene::TEMPNAMEPLACEHOLDERVALUE(CChoreoScene const&) */

CChoreoScene * __thiscall CChoreoScene::operator=(CChoreoScene *this,CChoreoScene *param_1)

{
  CChoreoScene CVar1;
  CChoreoScene CVar2;
  void *pvVar3;
  CChoreoEvent *pCVar4;
  CChoreoActor *pCVar5;
  int iVar6;
  CChoreoActor *this_00;
  float *pfVar7;
  int iVar8;
  CChoreoEvent *this_01;
  byte bVar9;
  ushort uVar10;
  int iVar11;
  int local_3c;
  int local_30;
  CChoreoChannel *local_2c;
  CChoreoEvent *local_28;
  float local_24;
  ushort local_20;
  
  iVar11 = 0;
  Init(this,*(IChoreoEventCallback **)(param_1 + 0xa0));
  if (0 < *(int *)(this + 0x24)) {
    do {
      pvVar3 = *(void **)(*(int *)(this + 0x18) + iVar11 * 4);
      if (pvVar3 != (void *)0x0) {
        *(undefined4 *)((int)pvVar3 + 0x10c) = 0;
        CUtlMemory<CChoreoChannel*,int>::Purge
                  ((CUtlMemory<CChoreoChannel*,int> *)((int)pvVar3 + 0x100));
        *(undefined4 *)((int)pvVar3 + 0x110) = *(undefined4 *)((int)pvVar3 + 0x100);
        CUtlMemory<CChoreoChannel*,int>::Purge
                  ((CUtlMemory<CChoreoChannel*,int> *)((int)pvVar3 + 0x100));
        operator_delete(pvVar3);
      }
      iVar11 = iVar11 + 1;
    } while (iVar11 < *(int *)(this + 0x24));
  }
  iVar11 = 0;
  *(undefined4 *)(this + 0x24) = 0;
  if (0 < *(int *)(this + 0x10)) {
    do {
      pCVar4 = *(CChoreoEvent **)(*(int *)(this + 4) + iVar11 * 4);
      if (pCVar4 != (CChoreoEvent *)0x0) {
        CChoreoEvent::~CChoreoEvent(pCVar4);
        operator_delete(pCVar4);
      }
      iVar11 = iVar11 + 1;
    } while (iVar11 < *(int *)(this + 0x10));
  }
  iVar11 = 0;
  *(undefined4 *)(this + 0x10) = 0;
  if (0 < *(int *)(this + 0x38)) {
    do {
      pvVar3 = *(void **)(*(int *)(this + 0x2c) + iVar11 * 4);
      if (pvVar3 != (void *)0x0) {
        *(undefined4 *)((int)pvVar3 + 0x90) = 0;
        CUtlMemory<CChoreoEvent*,int>::Purge((CUtlMemory<CChoreoEvent*,int> *)((int)pvVar3 + 0x84));
        *(undefined4 *)((int)pvVar3 + 0x94) = *(undefined4 *)((int)pvVar3 + 0x84);
        CUtlMemory<CChoreoEvent*,int>::Purge((CUtlMemory<CChoreoEvent*,int> *)((int)pvVar3 + 0x84));
        operator_delete(pvVar3);
      }
      iVar11 = iVar11 + 1;
    } while (iVar11 < *(int *)(this + 0x38));
  }
  *(undefined4 *)(this + 0x38) = 0;
  iVar11 = 0;
  *(undefined4 *)(this + 0xa4) = *(undefined4 *)(param_1 + 0xa4);
  *(undefined4 *)(this + 0x7c) = *(undefined4 *)(param_1 + 0x7c);
  *(undefined4 *)(this + 0x80) = *(undefined4 *)(param_1 + 0x80);
  *(undefined4 *)(this + 0x84) = *(undefined4 *)(param_1 + 0x84);
  *(undefined4 *)(this + 0x94) = *(undefined4 *)(param_1 + 0x94);
  *(undefined4 *)(this + 0x9c) = *(undefined4 *)(param_1 + 0x9c);
  *(undefined4 *)(this + 0x98) = *(undefined4 *)(param_1 + 0x98);
  *(undefined4 *)(this + 0xa4) = *(undefined4 *)(param_1 + 0xa4);
  CVar1 = this[0x20c];
  bVar9 = (byte)param_1[0x20c] & 4;
  this[0x20c] = (CChoreoScene)((byte)CVar1 & 0xfb | bVar9);
  *(undefined4 *)(this + 0x128) = *(undefined4 *)(param_1 + 0x128);
  CVar2 = param_1[0x20c];
  this[0x20c] = (CChoreoScene)((byte)CVar1 & 0xf3 | bVar9 | (byte)CVar2 & 8);
  this[0x20c] = (CChoreoScene)
                ((byte)CVar1 & 0xf1 | bVar9 | (byte)CVar2 & 8 | (byte)param_1[0x20c] & 2);
  if (0 < *(int *)(param_1 + 0x10)) {
    do {
      pCVar4 = *(CChoreoEvent **)(*(int *)(param_1 + 4) + iVar11 * 4);
      iVar6 = CChoreoEvent::GetActor(pCVar4);
      if (iVar6 == 0) {
        this_01 = (CChoreoEvent *)AllocEvent(this);
        CChoreoEvent::operator=(this_01,pCVar4);
      }
      iVar11 = iVar11 + 1;
    } while (iVar11 < *(int *)(param_1 + 0x10));
  }
  local_3c = 0;
  if (0 < *(int *)(param_1 + 0x24)) {
    do {
      pCVar5 = *(CChoreoActor **)(*(int *)(param_1 + 0x18) + local_3c * 4);
      this_00 = (CChoreoActor *)AllocActor(this);
      CChoreoActor::operator=(this_00,pCVar5);
      local_30 = 0;
      iVar11 = CChoreoActor::GetNumChannels(this_00);
      if (0 < iVar11) {
        do {
          local_2c = (CChoreoChannel *)CChoreoActor::GetChannel(this_00,local_30);
          CUtlVector<CChoreoChannel*,CUtlMemory<CChoreoChannel*,int>>::InsertBefore
                    ((CUtlVector<CChoreoChannel*,CUtlMemory<CChoreoChannel*,int>> *)(this + 0x2c),
                     *(int *)(this + 0x38),&local_2c);
          for (iVar11 = 0; iVar6 = CChoreoChannel::GetNumEvents(local_2c), iVar11 < iVar6;
              iVar11 = iVar11 + 1) {
            local_28 = (CChoreoEvent *)CChoreoChannel::GetEvent(local_2c,iVar11);
            CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>>::InsertBefore
                      ((CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>> *)(this + 4),
                       *(int *)(this + 0x10),&local_28);
            CChoreoEvent::SetScene(local_28,this);
          }
          local_30 = local_30 + 1;
          iVar11 = CChoreoActor::GetNumChannels(this_00);
        } while (local_30 < iVar11);
      }
      local_3c = local_3c + 1;
    } while (local_3c < *(int *)(param_1 + 0x24));
  }
  iVar11 = 0;
  V_strncpy((char *)(this + 0xa8),(char *)(param_1 + 0xa8),0x80);
  *(undefined4 *)(this + 0x138) = 0;
  if (0 < *(int *)(param_1 + 0x138)) {
    iVar6 = 0;
    do {
      iVar6 = iVar6 + 1;
      pfVar7 = (float *)(*(int *)(param_1 + 300) + iVar11);
      iVar11 = iVar11 + 10;
      local_28 = (CChoreoEvent *)*pfVar7;
      local_24 = pfVar7[1];
      bVar9 = *(byte *)((int)pfVar7 + 9);
      uVar10 = (ushort)bVar9 << 7 | (ushort)(*(byte *)(pfVar7 + 2) >> 1);
      local_20 = *(ushort *)(pfVar7 + 2) & 1 | uVar10 * 2;
      iVar8 = CCurveData::Add((CCurveData *)(this + 300),pfVar7[1],*pfVar7,
                              SUB21(*(ushort *)(pfVar7 + 2) & 1,0));
      *(byte *)(iVar8 + 9) = bVar9;
      *(byte *)(iVar8 + 8) = *(byte *)(iVar8 + 8) & 1 | (char)uVar10 * '\x02';
    } while (iVar6 < *(int *)(param_1 + 0x138));
  }
  iVar11 = 0;
  *(undefined4 *)(this + 0x140) = *(undefined4 *)(param_1 + 0x140);
  *(undefined2 *)(this + 0x144) = *(undefined2 *)(param_1 + 0x144);
  this[0x146] = param_1[0x146];
  *(undefined4 *)(this + 0x147) = *(undefined4 *)(param_1 + 0x147);
  *(undefined2 *)(this + 0x14b) = *(undefined2 *)(param_1 + 0x14b);
  this[0x14d] = param_1[0x14d];
  CUtlDict<int,int>::RemoveAll((CUtlDict<int,int> *)(this + 0x164));
  if (0 < *(int *)(param_1 + 0x178)) {
    iVar6 = 0;
    do {
      iVar11 = iVar11 + 1;
      iVar8 = *(int *)(param_1 + 0x168) + iVar6;
      iVar6 = iVar6 + 0x18;
      CUtlDict<int,int>::Insert
                ((CUtlDict<int,int> *)(this + 0x164),*(char **)(iVar8 + 0x10),(int *)(iVar8 + 0x14))
      ;
    } while (iVar11 < *(int *)(param_1 + 0x178));
  }
  V_strncpy((char *)(this + 0x188),(char *)(param_1 + 0x188),0x80);
  *(undefined4 *)(this + 0x210) = *(undefined4 *)(param_1 + 0x210);
  *(undefined4 *)(this + 0x214) = *(undefined4 *)(param_1 + 0x214);
  *(undefined4 *)(this + 0x208) = *(undefined4 *)(param_1 + 0x208);
  return this;
}

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)