L L4D2node

Intensity::Update

0x008d5cf0 · 335 bytes · __thiscall

_ZN9Intensity6UpdateEv

Decompiled

undefined (1 param)

/* Intensity::Update() */

void __thiscall Intensity::Update(Intensity *this)

{
  float fVar1;
  longdouble lVar2;
  float fVar3;
  float fVar4;
  float local_14;
  
  if (*(float *)(this + 0xc) <= 0.0) {
    local_14 = 99999.9;
  }
  else {
    lVar2 = (longdouble)IntervalTimer::Now();
    local_14 = (float)lVar2 - *(float *)(this + 0xc);
  }
  lVar2 = (longdouble)IntervalTimer::Now();
  if ((float)lVar2 != *(float *)(this + 0xc)) {
    (**(code **)(*(int *)(this + 8) + 4))(this + 8,this + 0xc);
    *(float *)(this + 0xc) = (float)lVar2;
  }
  lVar2 = (longdouble)CountdownTimer::Now();
  if (*(float *)(this + 0x18) <= (float)lVar2) {
    fVar3 = *(float *)this - local_14 / *(float *)(IntensityDecay._28_4_ + 0x2c);
    if (fVar3 < 0.0) {
      *(undefined4 *)this = 0;
      fVar3 = 0.0;
    }
    else {
      *(float *)this = fVar3;
    }
  }
  else {
    fVar3 = *(float *)this;
  }
  fVar1 = *(float *)(this + 4);
  fVar4 = fVar3 - fVar1;
  if (1e-06 <= fVar4) {
    lVar2 = (longdouble)__logf_finite(fVar4);
    lVar2 = (longdouble)
            __expf_finite(((float)lVar2 / *(float *)(IntensityAveragingDamp._28_4_ + 0x2c)) *
                          local_14);
    fVar3 = (float)lVar2 + fVar1;
  }
  *(float *)(this + 4) = fVar3;
  fVar3 = *(float *)(IntensityLock._28_4_ + 0x2c);
  if (0.0 <= fVar3) {
    *(float *)this = fVar3;
    *(float *)(this + 4) = fVar3;
  }
  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)