L L4D2node

CQueuedPacketSender::ClearQueuedPacketsForChannel

0x001ca990 · 244 bytes · __thiscall

_ZN19CQueuedPacketSender28ClearQueuedPacketsForChannelEP11INetChannel

Decompiled

undefined (2 params)

/* CQueuedPacketSender::ClearQueuedPacketsForChannel(INetChannel*) */

void __thiscall
CQueuedPacketSender::ClearQueuedPacketsForChannel(CQueuedPacketSender *this,INetChannel *param_1)

{
  void *pvVar1;
  int iVar2;
  int iVar3;
  
  pthread_mutex_lock((pthread_mutex_t *)(this + 0xcc));
  iVar2 = *(int *)(this + 0xc0) + -1;
  iVar3 = iVar2 * 4;
  if (-1 < iVar2) {
    do {
      while (pvVar1 = *(void **)(*(int *)(this + 0xb4) + iVar3),
            *(INetChannel **)((int)pvVar1 + 4) != param_1) {
        iVar2 = iVar2 + -1;
        iVar3 = iVar3 + -4;
        if (iVar2 == -1) goto LAB_001caa78;
      }
                    /* try { // try from 001caa0d to 001caa11 has its CatchHandler @ 001caa8a */
      CUtlPriorityQueue<CQueuedPacketSender::CQueuedPacket*,CDefUtlPriorityQueueLessFunc<CQueuedPacketSender::CQueuedPacket*>,CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>>
      ::RemoveAt((CUtlPriorityQueue<CQueuedPacketSender::CQueuedPacket*,CDefUtlPriorityQueueLessFunc<CQueuedPacketSender::CQueuedPacket*>,CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>>
                  *)(this + 0xb4),iVar2);
      *(undefined4 *)((int)pvVar1 + 0x2c) = 0;
      iVar2 = iVar2 + -1;
      iVar3 = iVar3 + -4;
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar1 + 0x20));
      *(undefined4 *)((int)pvVar1 + 0x30) = *(undefined4 *)((int)pvVar1 + 0x20);
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar1 + 0x20));
      *(undefined4 *)((int)pvVar1 + 0x18) = 0;
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar1 + 0xc));
      *(undefined4 *)((int)pvVar1 + 0x1c) = *(undefined4 *)((int)pvVar1 + 0xc);
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar1 + 0xc));
      operator_delete(pvVar1);
    } while (iVar2 != -1);
  }
LAB_001caa78:
  pthread_mutex_unlock((pthread_mutex_t *)(this + 0xcc));
  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)