L L4D2node

CParticleCollection::CheckIfOperatorShouldRun

0x00bcb670 · 459 bytes · __thiscall

_ZN19CParticleCollection24CheckIfOperatorShouldRunEPK25CParticleOperatorInstancePf.part.37

Decompiled

undefined (3 params)

/* CParticleCollection::CheckIfOperatorShouldRun(CParticleOperatorInstance const*, float*) [clone
   .part.37] */

undefined4 __thiscall
CParticleCollection::CheckIfOperatorShouldRun
          (CParticleCollection *this,CParticleOperatorInstance *param_1,float *param_2)

{
  int in_EAX;
  uint uVar1;
  float *in_ECX;
  int in_EDX;
  ushort in_FPUStatusWord;
  longdouble lVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  
  fVar4 = *(float *)(in_EAX + 0x24);
  fVar3 = fVar4;
  if ((*(int *)(in_EDX + 0x20) != 0) &&
     (fVar3 = *(float *)(in_EDX + 0x18) + fVar4 +
              (*(float *)(in_EDX + 0x1c) - *(float *)(in_EDX + 0x18)) *
              *(float *)(s_pRandomFloats +
                        (*(int *)(in_EDX + 0x20) + *(int *)(in_EAX + 0x348) & 0xfffU) * 4),
     fVar3 <= 0.0)) {
    fVar3 = 0.0;
  }
  if (*(int *)(in_EDX + 0x30) == 0) {
    fVar5 = *(float *)(in_EDX + 4);
  }
  else {
    fVar5 = *(float *)(in_EDX + 4);
    if (fVar5 < fVar3) {
      fVar6 = (*(float *)(in_EDX + 0x38) - *(float *)(in_EDX + 0x34)) *
              *(float *)(s_pRandomFloats +
                        (*(int *)(in_EDX + 0x30) + *(int *)(in_EAX + 0x348) & 0xfffU) * 4) +
              *(float *)(in_EDX + 0x34);
      if (0.0001 <= fVar6) {
        fVar6 = 1.0 / fVar6;
      }
      else {
        fVar6 = 10000.0;
      }
      fVar3 = (fVar3 - fVar5) * fVar6 + fVar5;
    }
  }
  if (0.0 < *(float *)(in_EDX + 0x14)) {
    fVar3 = fVar4 / *(float *)(in_EDX + 0x14);
    do {
      fVar3 = fVar3 - (fVar3 / 1.0) * 1.0;
    } while ((in_FPUStatusWord & 0x400) != 0);
  }
  lVar2 = (longdouble)
          FadeInOut(fVar5,*(float *)(in_EDX + 8),*(float *)(in_EDX + 0xc),*(float *)(in_EDX + 0x10),
                    fVar3);
  fVar4 = (float)lVar2;
  uVar1 = 0;
  if (*(int *)(in_EDX + 0x24) != 0) {
    uVar1 = *(int *)(in_EDX + 0x24) + *(int *)(in_EAX + 0x348) & 0xfff;
    fVar3 = ((*(float *)(in_EDX + 0x2c) - *(float *)(in_EDX + 0x28)) *
             *(float *)(s_pRandomFloats + uVar1 * 4) + *(float *)(in_EDX + 0x28)) * fVar4;
    if (fVar3 < 0.0) {
      *in_ECX = 0.0;
      return 0;
    }
    fVar4 = fVar3 * fVar4;
  }
  *in_ECX = fVar4;
  return CONCAT31((int3)(uVar1 >> 8),0.0 < fVar4);
}

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)