L L4D2node

GCSDK::CSharedObjectCache::AddSubscriber

0x00071f80 · 218 bytes · __thiscall

_ZN5GCSDK18CSharedObjectCache13AddSubscriberERK8CSteamID

Decompiled

undefined (2 params)

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

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

{
  int iVar1;
  int *piVar2;
  ushort uVar3;
  int iVar4;
  
  iVar1 = *(int *)(this + 0x34);
  if (0 < iVar1) {
    piVar2 = *(int **)(this + 0x28);
    if (piVar2[1] == *(int *)(param_1 + 4) && *piVar2 == *(int *)param_1) {
      return;
    }
    iVar4 = 0;
    do {
      iVar4 = iVar4 + 1;
      if (iVar4 == iVar1) goto LAB_00071fdb;
    } while (piVar2[iVar4 * 2 + 1] != *(int *)(param_1 + 4) || piVar2[iVar4 * 2] != *(int *)param_1)
    ;
    if (-1 < iVar4) {
      return;
    }
  }
LAB_00071fdb:
  CUtlVector<CSteamID,CUtlMemory<CSteamID,int>>::InsertBefore
            ((CUtlVector<CSteamID,CUtlMemory<CSteamID,int>> *)(this + 0x28),iVar1,param_1);
  for (uVar3 = 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)); uVar3 != 0xffff;
      uVar3 = 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),uVar3)) {
    CSharedObjectTypeCache::SendAllCreateToSubscriber
              (*(CSharedObjectTypeCache **)((uint)uVar3 * 0x10 + *(int *)(this + 0x10) + 0xc),
               param_1);
  }
  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)