L L4D2node

GCSDK::CSchema::CalcOffsets

0x0008cad0 · 129 bytes · __thiscall

_ZN5GCSDK7CSchema11CalcOffsetsEv

Decompiled

undefined (1 param)

/* GCSDK::CSchema::CalcOffsets() */

void __thiscall GCSDK::CSchema::CalcOffsets(CSchema *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)(this + 0x94) < 1) {
    iVar3 = 0;
  }
  else {
    iVar4 = *(int *)(this + 0x88);
    iVar1 = 0;
    iVar2 = 0;
    iVar3 = 0;
    do {
      while( true ) {
        *(int *)(iVar4 + 0x114 + iVar1) = iVar3;
        iVar4 = *(int *)(this + 0x88);
        iVar3 = iVar3 + ((uint *)(iVar4 + iVar1))[1];
        if (1 < *(uint *)(iVar4 + iVar1)) break;
        iVar2 = iVar2 + 1;
        iVar1 = iVar1 + 0x118;
        this[0xbc] = (CSchema)0x1;
        if (*(int *)(this + 0x94) <= iVar2) goto LAB_0008cb37;
      }
      iVar2 = iVar2 + 1;
      iVar1 = iVar1 + 0x118;
    } while (iVar2 < *(int *)(this + 0x94));
  }
LAB_0008cb37:
  *(int *)(this + 0xf4) = iVar3;
  if (this[0xbc] != (CSchema)0x0) {
    *(int *)(this + 0xf4) = iVar3 + 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)