L L4D2node

CChoreoEvent::operator=

0x00bacc30 · 1790 bytes · __thiscall

_ZN12CChoreoEventaSERKS_

Decompiled

undefined (2 params)

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

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

{
  CUtlVector<CEventRelativeTag,CUtlMemory<CEventRelativeTag,int>> *this_00;
  CChoreoEvent CVar1;
  CChoreoEvent CVar2;
  CChoreoEvent CVar3;
  CChoreoEvent CVar4;
  undefined4 uVar5;
  CFlexAnimationTrack *pCVar6;
  CUtlVector<CFlexTimingTag,CUtlMemory<CFlexTimingTag,int>> *this_01;
  CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>> *this_02;
  CFlexAnimationTrack *this_03;
  float *pfVar7;
  int iVar8;
  byte bVar9;
  byte bVar10;
  byte bVar11;
  ushort uVar12;
  int iVar13;
  int iVar14;
  CEventRelativeTag *pCVar15;
  CChoreoEvent *local_40;
  CFlexAnimationTrack *local_38;
  float local_34;
  ushort local_30;
  CChoreoEvent *local_24;
  CChoreoEvent *local_20;
  
  uVar5 = *(undefined4 *)(param_1 + 0x138);
  *(undefined4 *)(this + 0xb4) = 0;
  *(undefined4 *)(this + 0xb8) = 0;
  *(undefined4 *)(this + 0x138) = uVar5;
  *(undefined4 *)(this + 0x16c) = *(undefined4 *)(param_1 + 0x16c);
  this[4] = param_1[4];
  CUtlString::operator=((CUtlString *)(this + 8),(CUtlString *)(param_1 + 8));
  CUtlString::operator=((CUtlString *)(this + 0x18),(CUtlString *)(param_1 + 0x18));
  CUtlString::operator=((CUtlString *)(this + 0x28),(CUtlString *)(param_1 + 0x28));
  CUtlString::operator=((CUtlString *)(this + 0x38),(CUtlString *)(param_1 + 0x38));
  *(undefined4 *)(this + 0x48) = *(undefined4 *)(param_1 + 0x48);
  *(undefined4 *)(this + 0x4c) = *(undefined4 *)(param_1 + 0x4c);
  bVar10 = (byte)param_1[0x178] & 1;
  CVar1 = this[0x178];
  this[0x178] = (CChoreoEvent)((byte)CVar1 & 0xfe | bVar10);
  *(undefined4 *)(this + 0x50) = *(undefined4 *)(param_1 + 0x50);
  bVar11 = (byte)param_1[0x178] & 2;
  this[0x178] = (CChoreoEvent)((byte)CVar1 & 0xfc | bVar10 | bVar11);
  CVar2 = param_1[0x178];
  this[0x178] = (CChoreoEvent)((byte)CVar1 & 0xdc | bVar10 | bVar11 | (byte)CVar2 & 0x20);
  *(undefined4 *)(this + 0x134) = *(undefined4 *)(param_1 + 0x134);
  CVar3 = this[0x179];
  bVar9 = (byte)param_1[0x179] & 8;
  this[0x179] = (CChoreoEvent)((byte)CVar3 & 0xf7 | bVar9);
  CVar4 = param_1[0x179];
  this[0x179] = (CChoreoEvent)((byte)CVar3 & 0xe7 | bVar9 | (byte)CVar4 & 0x10);
  this[0x179] = (CChoreoEvent)
                ((byte)CVar3 & 0xa7 | bVar9 | (byte)CVar4 & 0x10 | (byte)param_1[0x179] & 0x40);
  this[0x178] = (CChoreoEvent)
                ((byte)CVar1 & 0xd8 | bVar10 | bVar11 | (byte)CVar2 & 0x20 |
                (byte)param_1[0x178] & 4);
  CUtlString::operator=((CUtlString *)(this + 0x94),(CUtlString *)(param_1 + 0x94));
  CUtlString::operator=((CUtlString *)(this + 0xa4),(CUtlString *)(param_1 + 0xa4));
  this_00 = (CUtlVector<CEventRelativeTag,CUtlMemory<CEventRelativeTag,int>> *)(this + 0xbc);
  CUtlVector<CEventRelativeTag,CUtlMemory<CEventRelativeTag,int>>::RemoveAll(this_00);
  CUtlMemory<CEventRelativeTag,int>::Purge((CUtlMemory<CEventRelativeTag,int> *)this_00);
  *(undefined4 *)(this + 0xcc) = *(undefined4 *)(this + 0xbc);
  this_01 = (CUtlVector<CFlexTimingTag,CUtlMemory<CFlexTimingTag,int>> *)(this + 0xd0);
  CUtlVector<CFlexTimingTag,CUtlMemory<CFlexTimingTag,int>>::RemoveAll(this_01);
  CUtlMemory<CFlexTimingTag,int>::Purge((CUtlMemory<CFlexTimingTag,int> *)this_01);
  *(undefined4 *)(this + 0xe0) = *(undefined4 *)(this + 0xd0);
  this_02 = (CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>> *)(this + 0xe4);
  CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>>::RemoveAll(this_02);
  iVar13 = 0;
  CUtlMemory<CEventAbsoluteTag,int>::Purge((CUtlMemory<CEventAbsoluteTag,int> *)this_02);
  *(undefined4 *)(this + 0xf4) = *(undefined4 *)(this + 0xe4);
  CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>>::RemoveAll
            ((CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>> *)(this + 0xf8));
  CUtlMemory<CEventAbsoluteTag,int>::Purge((CUtlMemory<CEventAbsoluteTag,int> *)(this + 0xf8));
  *(undefined4 *)(this + 0x108) = *(undefined4 *)(this + 0xf8);
  if (0 < *(int *)(param_1 + 200)) {
    do {
      CEventRelativeTag::CEventRelativeTag
                ((CEventRelativeTag *)&local_38,
                 (CEventRelativeTag *)(*(int *)(param_1 + 0xbc) + iVar13 * 0x18));
      local_24 = this;
                    /* try { // try from 00bacf12 to 00bacf16 has its CatchHandler @ 00bad32e */
      CUtlVector<CEventRelativeTag,CUtlMemory<CEventRelativeTag,int>>::InsertBefore
                (this_00,*(int *)(this + 200),(CEventRelativeTag *)&local_38);
      iVar13 = iVar13 + 1;
      CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)&local_38);
    } while (iVar13 < *(int *)(param_1 + 200));
  }
  iVar13 = 0;
  if (0 < *(int *)(param_1 + 0xdc)) {
    do {
      pCVar15 = (CEventRelativeTag *)(iVar13 * 0x1c + *(int *)(param_1 + 0xd0));
      CEventRelativeTag::CEventRelativeTag((CEventRelativeTag *)&local_38,pCVar15);
      local_20 = (CChoreoEvent *)CONCAT31(local_20._1_3_,pCVar15[0x18]);
      local_24 = this;
                    /* try { // try from 00bacf80 to 00bacf84 has its CatchHandler @ 00bad364 */
      CUtlVector<CFlexTimingTag,CUtlMemory<CFlexTimingTag,int>>::InsertBefore
                (this_01,*(int *)(this + 0xdc),(CFlexTimingTag *)&local_38);
      iVar13 = iVar13 + 1;
      CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)&local_38);
    } while (iVar13 < *(int *)(param_1 + 0xdc));
  }
  local_40 = param_1 + 0xe4;
  do {
    if (0 < *(int *)(local_40 + 0xc)) {
      iVar13 = 0;
      do {
        CEventAbsoluteTag::CEventAbsoluteTag
                  ((CEventAbsoluteTag *)&local_38,
                   (CEventAbsoluteTag *)(iVar13 * 0x1c + *(int *)local_40));
        local_20 = this;
                    /* try { // try from 00bacff7 to 00bacffb has its CatchHandler @ 00bad352 */
        CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>>::InsertBefore
                  (this_02,*(int *)(this_02 + 0xc),(CEventAbsoluteTag *)&local_38);
        iVar13 = iVar13 + 1;
        CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)&local_38);
      } while (iVar13 < *(int *)(local_40 + 0xc));
    }
    local_40 = local_40 + 0x14;
    this_02 = this_02 + 0x14;
  } while (this_02 !=
           (CUtlVector<CEventAbsoluteTag,CUtlMemory<CEventAbsoluteTag,int>> *)(this + 0x10c));
  iVar13 = *(int *)(this + 0x118);
  while (0 < iVar13) {
    RemoveTrack(this,0);
    iVar13 = *(int *)(this + 0x118);
  }
  iVar13 = 0;
  if (0 < *(int *)(param_1 + 0x118)) {
    do {
      pCVar6 = *(CFlexAnimationTrack **)(*(int *)(param_1 + 0x10c) + iVar13 * 4);
      this_03 = ::operator_new(0x60);
                    /* try { // try from 00bad081 to 00bad085 has its CatchHandler @ 00bad340 */
      CFlexAnimationTrack::CFlexAnimationTrack(this_03,pCVar6);
      iVar13 = iVar13 + 1;
      *(CChoreoEvent **)(this_03 + 0x58) = this;
      local_38 = this_03;
      CUtlVector<CFlexAnimationTrack*,CUtlMemory<CFlexAnimationTrack*,int>>::InsertBefore
                ((CUtlVector<CFlexAnimationTrack*,CUtlMemory<CFlexAnimationTrack*,int>> *)
                 (this + 0x10c),*(int *)(this + 0x118),&local_38);
    } while (iVar13 < *(int *)(param_1 + 0x118));
  }
  CVar1 = param_1[0x178];
  CVar2 = this[0x178];
  this[0x178] = (CChoreoEvent)((byte)CVar2 & 0xf7 | (byte)CVar1 & 8);
  this[0x178] = (CChoreoEvent)((byte)CVar2 & 0xe7 | (byte)CVar1 & 8 | (byte)param_1[0x178] & 0x10);
  *(undefined4 *)(this + 0x124) = *(undefined4 *)(param_1 + 0x124);
  *(undefined4 *)(this + 0x128) = *(undefined4 *)(param_1 + 0x128);
  *(undefined4 *)(this + 300) = *(undefined4 *)(param_1 + 300);
  *(undefined4 *)(this + 0x130) = *(undefined4 *)(param_1 + 0x130);
  *(undefined4 *)(this + 0x54) = *(undefined4 *)(param_1 + 0x54);
  uVar5 = *(undefined4 *)(param_1 + 0x58);
  *(undefined4 *)(this + 0x68) = 0;
  *(undefined4 *)(this + 0x58) = uVar5;
  iVar13 = 0;
  if (0 < *(int *)(param_1 + 0x68)) {
    iVar14 = 0;
    do {
      iVar13 = iVar13 + 1;
      pfVar7 = (float *)(*(int *)(param_1 + 0x5c) + iVar14);
      iVar14 = iVar14 + 10;
      local_38 = (CFlexAnimationTrack *)*pfVar7;
      local_34 = pfVar7[1];
      bVar9 = *(byte *)((int)pfVar7 + 9);
      uVar12 = (ushort)bVar9 << 7 | (ushort)(*(byte *)(pfVar7 + 2) >> 1);
      local_30 = *(ushort *)(pfVar7 + 2) & 1 | uVar12 * 2;
      iVar8 = CCurveData::Add((CCurveData *)(this + 0x5c),pfVar7[1],*pfVar7,
                              SUB21(*(ushort *)(pfVar7 + 2) & 1,0));
      *(byte *)(iVar8 + 9) = bVar9;
      *(byte *)(iVar8 + 8) = *(byte *)(iVar8 + 8) & 1 | (char)uVar12 * '\x02';
    } while (iVar13 < *(int *)(param_1 + 0x68));
  }
  *(undefined4 *)(this + 0x70) = *(undefined4 *)(param_1 + 0x70);
  *(undefined2 *)(this + 0x74) = *(undefined2 *)(param_1 + 0x74);
  this[0x76] = param_1[0x76];
  *(undefined4 *)(this + 0x77) = *(undefined4 *)(param_1 + 0x77);
  *(undefined2 *)(this + 0x7b) = *(undefined2 *)(param_1 + 0x7b);
  this[0x7d] = param_1[0x7d];
  this[5] = param_1[5];
  CUtlString::operator=((CUtlString *)(this + 0x13c),(CUtlString *)(param_1 + 0x13c));
  this[0x178] = (CChoreoEvent)((byte)this[0x178] & 0x7f | (byte)param_1[0x178] & 0x80);
  *(undefined4 *)(this + 0x14c) = *(undefined4 *)(param_1 + 0x14c);
  *(undefined4 *)(this + 0x150) = *(undefined4 *)(param_1 + 0x150);
  *(undefined4 *)(this + 0x154) = *(undefined4 *)(param_1 + 0x154);
  CVar1 = this[0x179];
  bVar9 = (byte)param_1[0x179] & 1;
  this[0x179] = (CChoreoEvent)((byte)CVar1 & 0xfe | bVar9);
  bVar10 = (byte)param_1[0x179] & 2;
  this[0x179] = (CChoreoEvent)((byte)CVar1 & 0xfc | bVar9 | bVar10);
  CVar2 = param_1[0x179];
  this[0x179] = (CChoreoEvent)((byte)CVar1 & 0xf8 | bVar9 | bVar10 | (byte)CVar2 & 4);
  this[0x179] = (CChoreoEvent)
                ((byte)CVar1 & 0xd8 | bVar9 | bVar10 | (byte)CVar2 & 4 | (byte)param_1[0x179] & 0x20
                );
  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)