L L4D2node

Intensity::Increase

0x008d5e60 · 283 bytes · __thiscall

_ZN9Intensity8IncreaseENS_13IntensityTypeE

Decompiled

undefined (2 params)

/* Intensity::Increase(Intensity::IntensityType) */

void __thiscall Intensity::Increase(Intensity *this,int param_2)

{
  float fVar1;
  longdouble lVar2;
  float fVar3;
  
  if (param_2 - 1U < 5) {
    fVar3 = *(float *)(&CSWTCH_1084 + (param_2 - 1U) * 4);
  }
  else {
    fVar3 = 0.0;
  }
  fVar3 = fVar3 * *(float *)(IntensityFactor._28_4_ + 0x2c) + *(float *)this;
  if (1.0 <= fVar3) {
    fVar3 = 1.0;
  }
  fVar1 = *(float *)(this + 0x18);
  *(float *)this = fVar3;
  lVar2 = (longdouble)CountdownTimer::Now();
  if (fVar1 - (float)lVar2 < 5.0) {
    lVar2 = (longdouble)CountdownTimer::Now();
    if ((float)lVar2 + 5.0 != *(float *)(this + 0x18)) {
      (**(code **)(*(int *)(this + 0x10) + 4))(this + 0x10,this + 0x18);
      *(float *)(this + 0x18) = (float)lVar2 + 5.0;
    }
    if (*(float *)(this + 0x14) != 5.0) {
      (**(code **)(*(int *)(this + 0x10) + 4))(this + 0x10,this + 0x14);
      *(undefined4 *)(this + 0x14) = 0x40a00000;
    }
  }
  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)