L L4D2node

GCSDK::CSharedObjectCache::RemoveSubscriber

0x00071e40 · 287 bytes · __thiscall

_ZN5GCSDK18CSharedObjectCache16RemoveSubscriberERK8CSteamID

Decompiled

undefined (2 params)

/* GCSDK::CSharedObjectCache::RemoveSubscriber(CSteamID const&) */

void __thiscall
GCSDK::CSharedObjectCache::RemoveSubscriber(CSharedObjectCache *this,CSteamID *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  int local_20;
  
  local_20 = *(int *)(this + 0x34);
  if (local_20 < 1) {
    return;
  }
  piVar1 = *(int **)(this + 0x28);
  iVar5 = *(int *)param_1;
  iVar2 = *(int *)(param_1 + 4);
  iVar3 = 0;
  if (piVar1[1] != iVar2 || *piVar1 != iVar5) {
    do {
      iVar3 = iVar3 + 1;
      if (iVar3 == local_20) {
        return;
      }
    } while (piVar1[iVar3 * 2 + 1] != iVar2 || piVar1[iVar3 * 2] != iVar5);
    if (iVar3 < 0) {
      return;
    }
    iVar3 = 0;
    do {
      iVar3 = iVar3 + 1;
      if (iVar3 == local_20) goto LAB_00071ec7;
    } while (piVar1[iVar3 * 2 + 1] != iVar2 || piVar1[iVar3 * 2] != iVar5);
    if (iVar3 == -1) goto LAB_00071ec7;
  }
  iVar5 = (local_20 - iVar3) + -1;
  if (0 < iVar5) {
    _V_memmove(piVar1 + iVar3 * 2,piVar1 + iVar3 * 2 + 2,iVar5 * 8);
    local_20 = *(int *)(this + 0x34);
  }
  *(int *)(this + 0x34) = local_20 + -1;
LAB_00071ec7:
  uVar4 = CUtlRBTree<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          ::FirstInorder((CUtlRBTree<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                          *)(this + 0xc));
  uVar4 = uVar4 & 0xffff;
  if (uVar4 == 0xffff) {
    return;
  }
  do {
    CSharedObjectTypeCache::SendAllDestroyToSubscriber
              (*(CSharedObjectTypeCache **)(uVar4 * 0x10 + *(int *)(this + 0x10) + 0xc),param_1);
    uVar4 = CUtlRBTree<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
            ::NextInorder((CUtlRBTree<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,GCSDK::CSharedObjectTypeCache*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                           *)(this + 0xc),(ushort)uVar4);
    uVar4 = uVar4 & 0xffff;
  } while (uVar4 != 0xffff);
  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)