L L4D2node

CHLTVClientState::ProcessPacketEntities

0x0016d040 · 759 bytes · __thiscall

_ZN16CHLTVClientState21ProcessPacketEntitiesEP18SVC_PacketEntities

Decompiled

undefined (2 params)

/* CHLTVClientState::ProcessPacketEntities(SVC_PacketEntities*) */

undefined4 __thiscall
CHLTVClientState::ProcessPacketEntities(CHLTVClientState *this,SVC_PacketEntities *param_1)

{
  int iVar1;
  CFrameSnapshot *this_00;
  CClientFrame *this_01;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 *puVar5;
  undefined ***local_4078;
  undefined4 local_4074;
  undefined **local_4068;
  SVC_PacketEntities local_4064;
  undefined4 local_4060;
  undefined4 local_405c;
  undefined4 local_4058;
  undefined8 local_4054;
  undefined4 local_404c;
  undefined4 local_4048;
  undefined8 local_4044;
  SVC_PacketEntities *local_403c;
  undefined4 local_4038;
  undefined1 local_4034;
  undefined8 local_4030;
  undefined4 local_4028;
  undefined4 local_4024;
  undefined4 local_401c;
  undefined4 local_4018;
  undefined4 local_20;
  
  if (param_1[0x54] == (SVC_PacketEntities)0x0) {
    local_4074 = 0;
  }
  else {
    if (*(int *)(this + 0xb8) == *(int *)(param_1 + 0x5c)) {
      Host_Error("Update self-referencing, connection dropped.\n");
      return 0;
    }
    local_4074 = CClientFrameManager::GetClientFrame
                           ((CClientFrameManager *)(*(int *)(this + 0x49ec) + 0x1cc),
                            *(int *)(param_1 + 0x5c),true);
  }
  this_00 = (CFrameSnapshot *)
            CFrameSnapshotManager::CreateEmptySnapshot
                      ((CFrameSnapshotManager *)framesnapshotmanager,*(int *)(this + 0xb8),
                       *(int *)(param_1 + 0x4c));
  this_01 = operator_new(0x11c);
                    /* try { // try from 0016d0cf to 0016d0d3 has its CatchHandler @ 0016d339 */
  CClientFrame::CClientFrame(this_01,this_00);
  *(CClientFrame **)(this + 0x49dc) = this_01;
  if (param_1[0x55] != (SVC_PacketEntities)0x0) {
    CBaseClientState::CopyEntityBaseline
              ((CBaseClientState *)this,*(int *)(param_1 + 0x58),
               (uint)(*(int *)(param_1 + 0x58) == 0));
    local_4018 = *(undefined4 *)(param_1 + 0x58);
    local_401c = *(undefined4 *)(this + 0xb8);
    local_405c = 0;
    local_4058 = 0;
    local_4054 = 0;
    local_404c = 0;
    local_4048 = 0;
    local_4044 = 0;
    local_403c = (SVC_PacketEntities *)0x0;
    local_4038 = 0;
    local_4034 = 0;
    local_4030 = 0;
    local_4028 = 0;
    local_4024 = 0;
    local_4064 = (SVC_PacketEntities)0x1;
    local_4060 = 0;
    local_4068 = &PTR__CLC_BaselineAck_002a1468;
    (**(code **)(**(int **)(this + 0x10) + 0xa8))(*(int **)(this + 0x10),&local_4068,1,0);
  }
  local_4078 = &local_4068;
  if (*(int *)(this + 0x49e0) != 0) {
    iVar1 = *(int *)(*(int *)(this + 0x49e0) + 0x118);
    if (0 < *(int *)(iVar1 + 0xc)) {
      iVar4 = 0;
      puVar2 = *(undefined4 **)(this_00 + 8);
      puVar5 = *(undefined4 **)(iVar1 + 8);
      do {
        iVar4 = iVar4 + 1;
        puVar2[1] = puVar5[1];
        *puVar2 = *puVar5;
        puVar2 = puVar2 + 3;
        puVar5 = puVar5 + 3;
      } while (iVar4 < *(int *)(iVar1 + 0xc));
    }
  }
  local_403c = param_1 + 100;
  local_20 = 0;
  local_4054 = 0xffffffffffffffff;
  local_404c = 0xffffffff;
  local_4060 = local_4074;
  local_405c = *(undefined4 *)(this + 0x49dc);
  local_4044 = 0;
  local_4068 = &PTR__CEntityReadInfo_002b11e0;
  local_4064 = param_1[0x54];
  local_4028 = 0;
  local_4024 = 0;
  local_4058 = 3;
  local_4048 = *(undefined4 *)(param_1 + 0x50);
  local_4030._0_5_ = CONCAT14(param_1[0x55],*(undefined4 *)(param_1 + 0x58));
  (**(code **)(*(int *)this + 0xd4))(this,local_4078);
  CFrameSnapshot::ReleaseReference(this_00);
  uVar3 = CBaseClientState::ProcessPacketEntities((CBaseClientState *)this,param_1);
  return uVar3;
}

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)