L L4D2node

CNetChan::ProcessPacket(netpacket_s*,bool)::CNetChannelPacketProcessingCallbackFinishProcessing::OnProcessingFinished

0x001add60 · 148 bytes · __thiscall

_ZZN8CNetChan13ProcessPacketEP11netpacket_sbEN51CNetChannelPacketProcessingCallbackFinishProcessing20OnProcessingFinishedEPS_b

Decompiled

undefined (3 params)

/* OnProcessingFinished(CNetChan*, bool) */

void __thiscall
CNetChan::ProcessPacket(netpacket_s*,bool)::CNetChannelPacketProcessingCallbackFinishProcessing::
OnProcessingFinished
          (CNetChannelPacketProcessingCallbackFinishProcessing *this,CNetChan *param_1,bool param_2)

{
  uint *puVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  int iVar8;
  
  if (*(int *)(this + 4) == g_pNetChannelProcessingActivePacket) {
    iVar5 = Plat_MSTime();
    iVar4 = g_pNetChannelProcessingActivePacket;
    uVar6 = iVar5 * 1000;
    uVar7 = uVar6 - *(uint *)(this + 8);
    iVar5 = **(int **)(g_pNetChannelProcessingActivePacket + 0x425c);
    iVar8 = -(uint)(uVar6 < *(uint *)(this + 8)) - *(int *)(this + 0xc);
    puVar1 = (uint *)(iVar5 + 0x14);
    uVar3 = *puVar1;
    *puVar1 = *puVar1 + uVar7;
    piVar2 = (int *)(iVar5 + 0x18);
    *piVar2 = *piVar2 + iVar8 + (uint)CARRY4(uVar3,uVar7);
    puVar1 = (uint *)(iVar4 + 0x4298);
    uVar3 = *puVar1;
    *puVar1 = *puVar1 + uVar7;
    piVar2 = (int *)(iVar4 + 0x429c);
    *piVar2 = *piVar2 + iVar8 + (uint)CARRY4(uVar3,uVar7);
    *(uint *)(this + 8) = uVar6;
    *(undefined4 *)(this + 0xc) = 0;
    if (!param_2) {
      return;
    }
    g_pNetChannelProcessingActivePacket = 0;
  }
  else if (!param_2) {
    return;
  }
  *(undefined ***)this = &PTR_OnProcessingFinished_002bb730;
  operator_delete(this);
  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)