L L4D2node

CQueuedPacketSender::Shutdown

0x001caab0 · 242 bytes · __thiscall

_ZN19CQueuedPacketSender8ShutdownEv

Decompiled

undefined (1 param)

/* CQueuedPacketSender::Shutdown() */

void __thiscall CQueuedPacketSender::Shutdown(CQueuedPacketSender *this)

{
  int iVar1;
  void *pvVar2;
  char cVar3;
  
  cVar3 = CThread::IsAlive();
  if (cVar3 == '\0') {
    return;
  }
  this[0x144] = (CQueuedPacketSender)0x1;
  CThreadEvent::Set();
  CThread::Join((uint)this);
  iVar1 = *(int *)(this + 0xc0);
  while (0 < iVar1) {
    pvVar2 = (void *)**(undefined4 **)(this + 0xb4);
    if (pvVar2 != (void *)0x0) {
      *(undefined4 *)((int)pvVar2 + 0x2c) = 0;
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar2 + 0x20));
      *(undefined4 *)((int)pvVar2 + 0x30) = *(undefined4 *)((int)pvVar2 + 0x20);
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar2 + 0x20));
      *(undefined4 *)((int)pvVar2 + 0x18) = 0;
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar2 + 0xc));
      *(undefined4 *)((int)pvVar2 + 0x1c) = *(undefined4 *)((int)pvVar2 + 0xc);
      CUtlMemory<char,int>::Purge((CUtlMemory<char,int> *)((int)pvVar2 + 0xc));
      operator_delete(pvVar2);
    }
    CUtlPriorityQueue<CQueuedPacketSender::CQueuedPacket*,CDefUtlPriorityQueueLessFunc<CQueuedPacketSender::CQueuedPacket*>,CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>>
    ::RemoveAtHead((CUtlPriorityQueue<CQueuedPacketSender::CQueuedPacket*,CDefUtlPriorityQueueLessFunc<CQueuedPacketSender::CQueuedPacket*>,CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>>
                    *)(this + 0xb4));
    iVar1 = *(int *)(this + 0xc0);
  }
  *(undefined4 *)(this + 0xc0) = 0;
  CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int>::Purge
            ((CUtlMemory<CQueuedPacketSender::CQueuedPacket*,int> *)(this + 0xb4));
  *(undefined4 *)(this + 0xc4) = *(undefined4 *)(this + 0xb4);
  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)