L L4D2node

CHLTVServer::StartRelay

0x001709a0 · 191 bytes · __thiscall

_ZN11CHLTVServer10StartRelayEv

Decompiled

undefined (1 param)

/* CHLTVServer::StartRelay() */

void __thiscall CHLTVServer::StartRelay(CHLTVServer *this)

{
  undefined4 uVar1;
  double dVar2;
  char cVar3;
  
  if (*(int *)(this + 0x274) < 2) {
    cVar3 = (**(code **)(*(int *)this + 0x78))(this);
    if (cVar3 == '\0') {
      DevMsg("StartRelay: not connected.\n");
                    /* WARNING: Could not recover jumptable at 0x00170a69. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*(int *)this + 0x14))();
      return;
    }
  }
  (**(code **)(*(int *)this + 0x18))(this);
  if (*(int *)(this + 0x6390) == 0) {
    InitClientRecvTables(this);
  }
  CHLTVFrame::AllocBuffers((CHLTVFrame *)(this + 0x51d0));
  uVar1 = tv_maxclients._28_4_;
  *(CHLTVServer **)(this + 0xc0) = this + 0x63bc;
  (**(code **)(*(int *)this + 0xb0))(this,*(undefined4 *)(uVar1 + 0x30));
  dVar2 = net_time;
  this[0x537c] = (CHLTVServer)0x1;
  *(int *)(this + 0x10c) = *(int *)(this + 0x10c) + 1;
  *(undefined4 *)(this + 8) = 1;
  *(float *)(this + 0x5380) = (float)dVar2;
  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)