L L4D2node

CDatacenter::Update

0x0005c1d0 · 175 bytes · __thiscall

_ZN11CDatacenter6UpdateEv

Decompiled

undefined (1 param)

/* CDatacenter::Update() */

void __thiscall CDatacenter::Update(CDatacenter *this)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  undefined4 uVar4;
  longdouble lVar5;
  
  iVar3 = GGCClient();
  if ((iVar3 == 0) || (cVar2 = IsLocalClientConnectedToServer(), cVar2 != '\0')) {
    iVar3 = *(int *)(this + 0x1c);
  }
  else {
    uVar4 = GGCClient();
    GCSDK::CGCClient::BMainLoop(CONCAT44(1000,uVar4));
    iVar3 = *(int *)(this + 0x1c);
  }
  if (iVar3 == 0) {
    lVar5 = (longdouble)Plat_FloatTime();
    if ((*(float *)(this + 0x18) < (float)lVar5) &&
       (cVar2 = IsLocalClientConnectedToServer(), cVar2 == '\0')) {
      RequestStart(this);
    }
  }
  else if ((-1 < iVar3) && (iVar3 < 3)) {
    RequestUpdate(this);
  }
  iVar3 = 0;
  if (0 < *(int *)(this + 0x2c)) {
    do {
      piVar1 = *(int **)(*(int *)(this + 0x20) + iVar3 * 4);
      iVar3 = iVar3 + 1;
      (**(code **)(*piVar1 + 0x14))(piVar1);
    } while (iVar3 < *(int *)(this + 0x2c));
  }
  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)