L L4D2node

CRestore::ReadTick

0x004a6000 · 137 bytes · __thiscall

_ZN8CRestore8ReadTickEPiii

Decompiled

undefined (4 params)

/* CRestore::ReadTick(int*, int, int) */

void __thiscall CRestore::ReadTick(CRestore *this,int *param_1,int param_2,int param_3)

{
  float fVar1;
  float fVar2;
  int iVar3;
  
  fVar1 = *(float *)(*(int *)(this + 0x1c) + 0x528);
  fVar2 = *(float *)(gpGlobals + 0x1c);
  iVar3 = (**(code **)(*(int *)this + 0x38))(this,param_1,param_2,param_3);
  iVar3 = iVar3 + -1;
  if (-1 < iVar3) {
    do {
      while (param_1[iVar3] != 0x7ffffffc) {
        param_1[iVar3] = param_1[iVar3] + (int)((fVar1 + 0.1) / fVar2 + 0.5);
        iVar3 = iVar3 + -1;
        if (iVar3 == -1) {
          return;
        }
      }
      param_1[iVar3] = -1;
      iVar3 = iVar3 + -1;
    } while (iVar3 != -1);
  }
  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)