L L4D2node

CSheetSimulator::EulerStep

0x004b0890 · 415 bytes · __thiscall

_ZN15CSheetSimulator9EulerStepEf

Decompiled

undefined (2 params)

/* CSheetSimulator::EulerStep(float) */

void __thiscall CSheetSimulator::EulerStep(CSheetSimulator *this,float param_1)

{
  float fVar1;
  float fVar2;
  int iVar3;
  float *pfVar4;
  int iVar5;
  int iVar6;
  float fVar7;
  float fVar8;
  
  iVar5 = 0;
  iVar6 = 0;
  if (0 < *(int *)this * *(int *)(this + 4)) {
    do {
      iVar6 = iVar6 + 1;
      iVar3 = *(int *)(this + 8) + iVar5;
      iVar5 = iVar5 + 0x34;
      *(undefined4 *)(iVar3 + 0x1c) = 0;
      *(undefined4 *)(iVar3 + 0x20) = 0;
      *(undefined4 *)(iVar3 + 0x24) = 0;
    } while (iVar6 < *(int *)this * *(int *)(this + 4));
  }
  ComputeForces(this);
  iVar6 = 0;
  iVar5 = 0;
  if (0 < *(int *)this * *(int *)(this + 4)) {
    do {
      iVar3 = *(int *)(this + 8) + iVar6;
      *(float *)(iVar3 + 8) = *(float *)(iVar3 + 0x14) * param_1 + *(float *)(iVar3 + 8);
      *(float *)(iVar3 + 0xc) = *(float *)(iVar3 + 0x18) * param_1 + *(float *)(iVar3 + 0xc);
      *(float *)(iVar3 + 4) = *(float *)(iVar3 + 0x10) * param_1 + *(float *)(iVar3 + 4);
      pfVar4 = (float *)(*(int *)(this + 8) + iVar6);
      fVar8 = 1.0 / *pfVar4;
      pfVar4[5] = pfVar4[8] * fVar8 * param_1 + pfVar4[5];
      pfVar4[6] = pfVar4[9] * fVar8 * param_1 + pfVar4[6];
      pfVar4[4] = fVar8 * pfVar4[7] * param_1 + pfVar4[4];
      iVar3 = *(int *)(this + 8) + iVar6;
      fVar8 = *(float *)(iVar3 + 0x10);
      fVar1 = *(float *)(iVar3 + 0x14);
      fVar2 = *(float *)(iVar3 + 0x18);
      fVar7 = fVar8 * fVar8 + fVar1 * fVar1 + fVar2 * fVar2;
      if (1e+06 < fVar7) {
        fVar7 = 1000.0 / SQRT(fVar7);
        *(float *)(iVar3 + 0x10) = fVar8 * fVar7;
        *(float *)(iVar3 + 0x14) = fVar1 * fVar7;
        *(float *)(iVar3 + 0x18) = fVar2 * fVar7;
      }
      iVar5 = iVar5 + 1;
      iVar6 = iVar6 + 0x34;
    } while (iVar5 < *(int *)this * *(int *)(this + 4));
  }
  SatisfyCollisionConstraints(this);
  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)