CQueuedPacketSender::QueuePacket
0x001ca680 · 288 bytes · __thiscall
_ZN19CQueuedPacketSender11QueuePacketEP11INetChanneliPKciPK8sockaddrij
Decompiled
undefined (8 params)
/* CQueuedPacketSender::QueuePacket(INetChannel*, int, char const*, int, sockaddr const*, int,
unsigned int) */
void __thiscall
CQueuedPacketSender::QueuePacket
(CQueuedPacketSender *this,INetChannel *param_1,int param_2,char *param_3,int param_4,
sockaddr *param_5,int param_6,uint param_7)
{
int iVar1;
CQueuedPacket *local_20 [4];
pthread_mutex_lock((pthread_mutex_t *)(this + 0xcc));
/* try { // try from 001ca69a to 001ca7a2 has its CatchHandler @ 001ca7a8 */
iVar1 = Plat_MSTime();
if (*(int *)(this + 0xc0) < 0x400) {
local_20[0] = operator_new(0x34);
*(int *)(local_20[0] + 0xc) = 0;
*(int *)(local_20[0] + 0x10) = 0;
*(int *)(local_20[0] + 0x14) = 0;
*(uint *)local_20[0] = iVar1 + param_7;
*(int *)(local_20[0] + 0x18) = 0;
*(int *)(local_20[0] + 0x1c) = 0;
*(int *)(local_20[0] + 0x20) = 0;
*(int *)(local_20[0] + 0x24) = 0;
*(int *)(local_20[0] + 0x28) = 0;
*(int *)(local_20[0] + 0x2c) = 0;
*(int *)(local_20[0] + 0x30) = 0;
*(int *)(local_20[0] + 8) = param_2;
*(INetChannel **)(local_20[0] + 4) = param_1;
CUtlVector<char,CUtlMemory<char,int>>::CopyArray
((CUtlVector<char,CUtlMemory<char,int>> *)(local_20[0] + 0x20),param_3,param_4);
CUtlVector<char,CUtlMemory<char,int>>::CopyArray
((CUtlVector<char,CUtlMemory<char,int>> *)(local_20[0] + 0xc),(char *)param_5,param_6)
;
CUtlPriorityQueue<CQueuedPacketSender::CQueuedPacket*,CDefUtlPriorityQueueLessFunc<CQueuedPacketSender::CQueuedPacket*>,CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>>
::Insert((CUtlPriorityQueue<CQueuedPacketSender::CQueuedPacket*,CDefUtlPriorityQueueLessFunc<CQueuedPacketSender::CQueuedPacket*>,CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>>
*)(this + 0xb4),local_20);
}
else {
QueuePacket(INetChannel*,int,char_const*,int,sockaddr_const*,int,unsigned_int)::nWarnings =
QueuePacket(INetChannel*,int,char_const*,int,sockaddr_const*,int,unsigned_int)::nWarnings +
-1;
if (0 < QueuePacket(INetChannel*,int,char_const*,int,sockaddr_const*,int,unsigned_int)::
nWarnings) {
Warning(
"CQueuedPacketSender: num queued packets >= nMaxQueuedPackets. Not queueing anymore.\n"
);
}
}
CThreadEvent::Set();
pthread_mutex_unlock((pthread_mutex_t *)(this + 0xcc));
return;
}
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.