NET_QueuePacketForSend
0x001c8110 · 236 bytes · __regparm3
_ZL22NET_QueuePacketForSendP8CNetChanbiPKciPK8sockaddrij.isra.90.constprop.104
Decompiled
undefined (8 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* NET_QueuePacketForSend(CNetChan*, bool, int, char const*, int, sockaddr const*, int, unsigned
int) [clone .isra.90] [clone .constprop.104] */
char * __regparm3
NET_QueuePacketForSend
(CNetChan *param_1,bool param_2,int param_3,char *param_4,int param_5,sockaddr *param_6,
int param_7,uint param_8)
{
char cVar1;
uint uVar2;
undefined3 in_register_00000009;
undefined4 *puVar3;
if (*(int *)(net_queued_packet_thread._28_4_ + 0x30) != 0) {
cVar1 = (**(code **)(*g_pQueuedPackedSender + 8))(g_pQueuedPackedSender);
if (cVar1 != '\0') {
(**(code **)(*g_pQueuedPackedSender + 0x10))
(g_pQueuedPackedSender,param_1,CONCAT31(in_register_00000009,param_2),param_3,
param_4,param_5,0x10,param_6);
return param_4;
}
}
uVar2 = CUtlLinkedList<SendQueueItem_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<SendQueueItem_t,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<SendQueueItem_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<SendQueueItem_t,unsigned_short>,unsigned_short>>
*)&DAT_003ac404,0xffff);
puVar3 = (undefined4 *)((uVar2 & 0xffff) * 0x7c + _DAT_003ac404);
puVar3[1] = CONCAT31(in_register_00000009,param_2);
*puVar3 = param_1;
CUtlBuffer::Put((CUtlBuffer *)(puVar3 + 2),(void *)param_3,(int)param_4);
CUtlBuffer::Put((CUtlBuffer *)(puVar3 + 0x10),(void *)param_5,0x10);
CNetChan::IncrementQueuedPackets((CNetChan *)*puVar3);
return param_4;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.