L L4D2node

CHLTVDemoRecorder::WriteFrame

0x0016edb0 · 636 bytes · __thiscall

_ZN17CHLTVDemoRecorder10WriteFrameEP10CHLTVFrame

Decompiled

undefined (2 params)

/* CHLTVDemoRecorder::WriteFrame(CHLTVFrame*) */

void __thiscall CHLTVDemoRecorder::WriteFrame(CHLTVDemoRecorder *this,CHLTVFrame *param_1)

{
  uchar *puVar1;
  int iVar2;
  CClientFrame *pCVar3;
  CFrameSnapshot *pCVar4;
  bf_write local_8c [24];
  undefined **local_74;
  undefined1 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined8 local_60;
  undefined4 local_58;
  undefined4 local_54;
  undefined8 local_50;
  undefined4 local_48;
  undefined4 local_44;
  undefined1 local_40;
  undefined8 local_3c;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  puVar1 = (uchar *)NET_AllocPayload();
                    /* try { // try from 0016edf2 to 0016ee16 has its CatchHandler @ 0016f056 */
  bf_write::bf_write(local_8c,"CHLTVDemo::RecordFrame",puVar1,0x37aa0,-1);
  if (*(int *)(param_1 + 0x140) != 0) {
    bf_write::WriteBits(local_8c,*(void **)(param_1 + 0x134),*(int *)(param_1 + 0x140));
  }
  local_28 = *(undefined4 *)(param_1 + 8);
  local_60 = 0;
  local_50 = 0;
  local_3c = 0;
  local_24 = host_frametime_unbounded;
  local_68 = 0;
  local_64 = 0;
  local_58 = 0;
  local_54 = 0;
  local_48 = 0;
  local_44 = 0;
  local_40 = 0;
  local_34 = 0;
  local_30 = 0;
  local_6c = 0;
  local_74 = &PTR__NET_Tick_002a1b28;
  local_70 = 0;
  local_20 = host_frametime_stddeviation;
                    /* try { // try from 0016eea2 to 0016efc5 has its CatchHandler @ 0016f037 */
  NET_Tick::WriteToBuffer((NET_Tick *)&local_74,local_8c);
  iVar2 = *(int *)(this + 0x594);
  if (*(int *)(this + 0x594) <= *(int *)(this + 0x590)) {
    iVar2 = *(int *)(this + 0x590);
  }
  CNetworkStringTableContainer::WriteUpdateMessage(DAT_003b801c,(CBaseClient *)0x0,iVar2,local_8c);
  pCVar3 = (CClientFrame *)
           CClientFrameManager::GetClientFrame
                     ((CClientFrameManager *)(hltv + 0x1cc),*(int *)(this + 0x590),true);
  CBaseServer::WriteDeltaEntities
            ((CBaseServer *)&sv,*(CBaseClient **)(hltv + 0x210),(CClientFrame *)param_1,pCVar3,
             local_8c);
  if (pCVar3 == (CClientFrame *)0x0) {
    pCVar4 = (CFrameSnapshot *)0x0;
  }
  else {
    pCVar4 = *(CFrameSnapshot **)(pCVar3 + 0x118);
  }
  CBaseServer::WriteTempEntities
            ((CBaseServer *)&sv,*(CBaseClient **)(hltv + 0x210),
             *(CFrameSnapshot **)(param_1 + 0x118),pCVar4,local_8c,0xff);
  if (*(int *)(param_1 + 0x188) == 0) {
    iVar2 = *(int *)(param_1 + 0x170);
  }
  else {
                    /* try { // try from 0016f001 to 0016f029 has its CatchHandler @ 0016f037 */
    bf_write::WriteBits(local_8c,*(void **)(param_1 + 0x17c),*(int *)(param_1 + 0x188));
    iVar2 = *(int *)(param_1 + 0x170);
  }
  if (iVar2 != 0) {
    bf_write::WriteBits(local_8c,*(void **)(param_1 + 0x164),iVar2);
  }
  if (*(int *)(param_1 + 0x158) != 0) {
    bf_write::WriteBits(local_8c,*(void **)(param_1 + 0x14c),*(int *)(param_1 + 0x158));
  }
  *(undefined4 *)(this + 0x590) = *(undefined4 *)(param_1 + 8);
  WriteMessages(this,'\x02',local_8c);
  local_74 = &PTR__INetMessage_002a1188;
  NET_FreePayload(puVar1);
  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)