L L4D2node

CClockDriftMgr::AdjustAverageDifferenceBy

0x00115bb0 · 104 bytes · __thiscall

_ZN14CClockDriftMgr25AdjustAverageDifferenceByEf

Decompiled

undefined (2 params)

/* CClockDriftMgr::AdjustAverageDifferenceBy(float) */

void __thiscall CClockDriftMgr::AdjustAverageDifferenceBy(CClockDriftMgr *this,float param_1)

{
  int iVar1;
  float fVar2;
  float fVar3;
  
  iVar1 = 0;
  fVar2 = 0.0;
  do {
    fVar2 = fVar2 + *(float *)(this + iVar1 * 4);
    iVar1 = iVar1 + 1;
  } while (iVar1 != 0x10);
  if (0.05 <= fVar2 * 0.0625) {
    iVar1 = 0;
    fVar3 = param_1 / DAT_003a1730;
    do {
      *(float *)(this + iVar1 * 4) = *(float *)(this + iVar1 * 4) * (fVar3 / (fVar2 * 0.0625) + 1.0)
      ;
      iVar1 = iVar1 + 1;
    } while (iVar1 != 0x10);
  }
  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)