L L4D2node

GCSDK::CSharedObjectTypeCache::BDestroyObject

0x00071c30 · 165 bytes · __thiscall

_ZN5GCSDK22CSharedObjectTypeCache14BDestroyObjectERKNS_13CSharedObjectE

Decompiled

undefined (2 params)

/* GCSDK::CSharedObjectTypeCache::BDestroyObject(GCSDK::CSharedObject const&) */

undefined4 __thiscall
GCSDK::CSharedObjectTypeCache::BDestroyObject(CSharedObjectTypeCache *this,CSharedObject *param_1)

{
  int iVar1;
  CSharedObject *this_00;
  char cVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  
  iVar3 = FindSharedObjectIndex(this,param_1);
  if ((-1 < iVar3) && (iVar3 < *(int *)(this + 0x10))) {
    this_00 = *(CSharedObject **)(*(int *)(this + 4) + iVar3 * 4);
    piVar4 = *(int **)(this + 0x18);
    if (0 < piVar4[3]) {
      iVar5 = 0;
      do {
        iVar1 = iVar5 * 8;
        iVar5 = iVar5 + 1;
        CSharedObject::BSendDestroyToSteamID(this_00,(CSteamID *)(*piVar4 + iVar1));
        piVar4 = *(int **)(this + 0x18);
      } while (iVar5 < piVar4[3]);
    }
    cVar2 = (**(code **)(*(int *)this_00 + 0x20))(this_00);
    if (cVar2 != '\0') {
      (**(code **)(*(int *)this_00 + 4))(this_00);
      CUtlVector<GCSDK::CSharedObject*,CUtlMemory<GCSDK::CSharedObject*,int>>::ShiftElementsLeft
                ((CUtlVector<GCSDK::CSharedObject*,CUtlMemory<GCSDK::CSharedObject*,int>> *)
                 (this + 4),iVar3,1);
      *(int *)(this + 0x10) = *(int *)(this + 0x10) + -1;
      return 1;
    }
  }
  return 0;
}

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)