L L4D2node

GCSDK::CJobMgr::PauseJob

0x00062b80 · 265 bytes · __thiscall

_ZN5GCSDK7CJobMgr8PauseJobERNS_4CJobENS_15EJobPauseReasonE

Decompiled

undefined (3 params)

/* GCSDK::CJobMgr::PauseJob(GCSDK::CJob&, GCSDK::EJobPauseReason) */

void __thiscall GCSDK::CJobMgr::PauseJob(CJobMgr *this,CJob *param_1,undefined4 param_3)

{
  undefined4 uVar1;
  ushort uVar2;
  int iVar3;
  int iVar4;
  undefined4 *puVar5;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  local_28 = *(undefined4 *)(param_1 + 8);
  local_24 = *(undefined4 *)(param_1 + 0xc);
  uVar2 = CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::Find((CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *)(this + 0x90),(Node_t *)&local_28);
  if (uVar2 == 0xffff) {
    iVar4 = CUtlLinkedList<GCSDK::CJobMgr::JobTimeout_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<GCSDK::CJobMgr::JobTimeout_t,int>,int>>
            ::InsertBefore((CUtlLinkedList<GCSDK::CJobMgr::JobTimeout_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<GCSDK::CJobMgr::JobTimeout_t,int>,int>>
                            *)(this + 0x68),-1);
    local_24 = *(undefined4 *)(param_1 + 0xc);
    puVar5 = (undefined4 *)(*(int *)(this + 0x68) + iVar4 * 0x24);
    local_20 = *(undefined4 *)(this + 0x78);
    local_28 = *(undefined4 *)(param_1 + 8);
    CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
    ::Insert((CUtlRBTree<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
              *)(this + 0x90),(Node_t *)&local_28);
  }
  else {
    iVar4 = *(int *)(this + 0x94) + (uint)uVar2 * 0x14;
    CUtlLinkedList<GCSDK::CJobMgr::JobTimeout_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<GCSDK::CJobMgr::JobTimeout_t,int>,int>>
    ::LinkBefore((CUtlLinkedList<GCSDK::CJobMgr::JobTimeout_t,int,false,int,CUtlMemory<UtlLinkedListElem_t<GCSDK::CJobMgr::JobTimeout_t,int>,int>>
                  *)(this + 0x68),-1,*(int *)(iVar4 + 0x10));
    iVar3 = *(int *)(this + 0x78);
    *(int *)(iVar4 + 0x10) = iVar3;
    puVar5 = (undefined4 *)(*(int *)(this + 0x68) + iVar3 * 0x24);
  }
  uVar1 = *(undefined4 *)(param_1 + 0xc);
  *puVar5 = *(undefined4 *)(param_1 + 8);
  puVar5[1] = uVar1;
  CJobTime::SetToJobTime((CJobTime *)(puVar5 + 2));
  CJobTime::SetToJobTime((CJobTime *)(puVar5 + 4));
  iVar3 = (**(code **)(*(int *)param_1 + 0x10))(param_1);
  iVar4 = 2;
  if (iVar3 != 0) {
    iVar4 = iVar3;
  }
  puVar5[6] = iVar4;
  CJob::Pause(param_1,param_3);
  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)