L L4D2node

GCSDK::CJobMgr::RemoveJob

0x000620f0 · 263 bytes · __thiscall

_ZN5GCSDK7CJobMgr9RemoveJobERNS_4CJobE

Decompiled

undefined (2 params)

/* GCSDK::CJobMgr::RemoveJob(GCSDK::CJob&) */

void __thiscall GCSDK::CJobMgr::RemoveJob(CJobMgr *this,CJob *param_1)

{
  double dVar1;
  int iVar2;
  uint uVar3;
  longlong lVar4;
  undefined4 local_28;
  undefined4 local_24;
  
  local_28 = *(undefined4 *)(param_1 + 8);
  local_24 = *(undefined4 *)(param_1 + 0xc);
  iVar2 = CUtlRBTree<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int,CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int>,int>>
          ::Find((CUtlRBTree<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int,CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int>,int>>
                  *)this,(Node_t *)&local_28);
  if (iVar2 != -1) {
    CUtlRBTree<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int,CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int>,int>>
    ::Unlink((CUtlRBTree<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int,CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int>,int>>
              *)this,iVar2);
    *(int *)(*(int *)(this + 4) + iVar2 * 0x1c) = iVar2;
    *(undefined4 *)(*(int *)(this + 4) + 4 + iVar2 * 0x1c) = *(undefined4 *)(this + 0x18);
    *(int *)(this + 0x14) = *(int *)(this + 0x14) + -1;
    *(int *)(this + 0x18) = iVar2;
  }
  AccumulateStatsofJob(this,param_1);
  *(int *)(this + 0xb4) = *(int *)(this + 0xb4) + 1;
  if (((byte)param_1[0x18] & 1) != 0) {
    *(int *)(this + 0xb8) = *(int *)(this + 0xb8) + 1;
  }
  lVar4 = CJobTime::CServerMicroSecsPassed((CJobTime *)(param_1 + 0x28));
  uVar3 = (uint)((ulonglong)lVar4 >> 0x20);
  dVar1 = (double)lVar4;
  if (lVar4 < 0) {
    dVar1 = dVar1 + 1.8446744073709552e+19;
  }
  *(double *)(this + 0xc4) = *(double *)(this + 0xc4) + dVar1;
  *(double *)(this + 0xcc) = dVar1 * dVar1 + *(double *)(this + 0xcc);
  if (*(uint *)(this + 0xd8) <= uVar3) {
    if ((uVar3 <= *(uint *)(this + 0xd8)) && ((uint)lVar4 <= *(uint *)(this + 0xd4))) {
      return;
    }
    *(longlong *)(this + 0xd4) = lVar4;
  }
  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)