L L4D2node

CHLTVServer::RunFrame

0x00173800 · 831 bytes · __thiscall

_ZN11CHLTVServer8RunFrameEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CHLTVServer::RunFrame() */

void __thiscall CHLTVServer::RunFrame(CHLTVServer *this)

{
  CBaseServer *this_00;
  uint *puVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  CSteam3Server *this_01;
  longdouble lVar5;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  local_24 = 0;
  local_20 = 0;
  if (_Plat_SetBenchmarkMode == 0) {
    local_10 = 0;
  }
  else {
    (**(code **)(_Plat_SetBenchmarkMode + 0x50))
              (_Plat_SetBenchmarkMode,&local_24,0,0,0,0,"/data/src/engine/./hltvserver.cpp",0x605,
               &RunFrame()::tm_fmt,"(%s)%s",&DAT_002b07c7,"CHLTVServer::RunFrame");
    local_10 = _Plat_SetBenchmarkMode;
  }
  iVar2 = _DAT_0040b9d4;
  local_18 = local_24;
  local_14 = local_20;
                    /* try { // try from 001739ae to 00173a0e has its CatchHandler @ 00173b5f */
  if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
    if ((char *)*_DAT_0040b030 != "CHLTVServer::RunFrame") {
      _DAT_0040b030 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2b18d7,(char *)0x0,0x2b07c7);
    }
    puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0040b02c = '\0';
  }
                    /* try { // try from 001738b3 to 00173948 has its CatchHandler @ 00173b74 */
  lVar5 = (longdouble)Plat_FloatTime();
  NET_RunFrame((double)lVar5);
  if (0 < *(int *)(this + 0x274)) {
    NET_ProcessSocket(*(int *)(this + 0x220),(IConnectionlessPacketHandler *)(this + 0x218));
    CHLTVClientState::RunFrame((CHLTVClientState *)(this + 0x214));
    CHLTVClientState::SendPacket((CHLTVClientState *)(this + 0x214));
  }
  this_00 = (CBaseServer *)(this + 4);
  cVar3 = (**(code **)(*(int *)(this + 4) + 0x58))(this_00);
  if (cVar3 != '\0') {
    if (0.0 < host_frametime) {
      *(float *)(this + 0x5384) = 0.01 / host_frametime + *(float *)(this + 0x5384) * 0.99;
    }
    cVar3 = (**(code **)(*(int *)this + 0x78))(this);
    if (cVar3 == '\0') {
                    /* try { // try from 00173a7b to 00173ab3 has its CatchHandler @ 00173b74 */
      UpdateTick(this);
      CBaseServer::RunFrame(this_00);
      UpdateStats(this);
      (**(code **)(*(int *)this + 0xb8))(this);
      if (DAT_003b7f64 < 2) {
                    /* try { // try from 00173b18 to 00173b24 has its CatchHandler @ 00173b74 */
        this_01 = (CSteam3Server *)Steam3Server();
        CSteam3Server::RunFrame(this_01);
      }
      CBaseServer::UpdateMasterServer(this_00);
      iVar2 = _DAT_0040b9d4;
      if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
         (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
        cVar3 = CVProfNode::ExitScope();
        if (cVar3 != '\0') {
          _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
        }
        DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
      }
      if (local_10 == 0) {
        return;
      }
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
      return;
    }
  }
  iVar2 = _DAT_0040b9d4;
  if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
    }
    DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
  }
  if (local_10 != 0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  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)