L L4D2node

GCSDK::CNetPacketPool::CreateNetPacket

0x00071550 · 112 bytes · __cdecl

_ZN5GCSDK14CNetPacketPool15CreateNetPacketEPhi

Decompiled

undefined (2 params)

/* GCSDK::CNetPacketPool::CreateNetPacket(unsigned char*, int) */

CNetPacket * GCSDK::CNetPacketPool::CreateNetPacket(uchar *param_1,int param_2)

{
  CNetPacket *this;
  uchar *__dest;
  
  g_cNetPacket = g_cNetPacket + 1;
  this = (CNetPacket *)CUtlMemoryPool::Alloc((CUtlMemoryPool *)sm_MemPoolNetPacket);
  if (this != (CNetPacket *)0x0) {
    CNetPacket::CNetPacket(this);
  }
  __dest = (uchar *)CThreadSafeMultiMemoryPool::Alloc
                              ((CThreadSafeMultiMemoryPool *)g_MemPoolMsg,param_2);
  memcpy(__dest,param_1,param_2);
  CNetPacket::Init(this,__dest,param_2,__dest);
  return this;
}

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)