L L4D2node

CChoreoScene::ResetSimulation

0x00bb3070 · 296 bytes · __thiscall

_ZN12CChoreoScene15ResetSimulationEbff

Decompiled

undefined (4 params)

/* CChoreoScene::ResetSimulation(bool, float, float) */

void __thiscall
CChoreoScene::ResetSimulation(CChoreoScene *this,bool param_1,float param_2,float param_3)

{
  char cVar1;
  int iVar2;
  int iVar3;
  longdouble lVar4;
  float fVar5;
  CChoreoEvent *local_20 [4];
  
  iVar3 = 0;
  *(undefined4 *)(this + 0x60) = 0;
  *(undefined4 *)(this + 0x4c) = 0;
  *(undefined4 *)(this + 0x74) = 0;
  if (0 < *(int *)(this + 0x10)) {
    do {
      while( true ) {
        local_20[0] = *(CChoreoEvent **)(*(int *)(this + 4) + iVar3 * 4);
        CChoreoEvent::ResetProcessing(local_20[0]);
        iVar2 = CChoreoEvent::GetType(local_20[0]);
        if (iVar2 != 1) break;
        iVar3 = iVar3 + 1;
        CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>>::InsertBefore
                  ((CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>> *)(this + 0x68),
                   *(int *)(this + 0x74),local_20);
        if (*(int *)(this + 0x10) <= iVar3) goto LAB_00bb310a;
      }
      cVar1 = CChoreoEvent::IsResumeCondition(local_20[0]);
      if (cVar1 != '\0') {
        CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>>::InsertBefore
                  ((CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>> *)(this + 0x40),
                   *(int *)(this + 0x4c),local_20);
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(int *)(this + 0x10));
  }
LAB_00bb310a:
  lVar4 = (longdouble)FindAdjustedStartTime(this);
  *(float *)(this + 0x88) = (float)lVar4;
  lVar4 = (longdouble)FindAdjustedEndTime(this);
  fVar5 = (float)lVar4;
  *(float *)(this + 0x8c) = fVar5;
  if (param_1) {
    fVar5 = *(float *)(this + 0x88);
  }
  *(float *)(this + 0x7c) = fVar5;
  *(undefined4 *)(this + 0x98) = 0;
  *(float *)(this + 0x80) = param_2;
  *(undefined4 *)(this + 0x90) = *(undefined4 *)(this + 0x10);
  *(float *)(this + 0x84) = param_3;
  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)