L L4D2node

CEntityDataInstantiator<CWatcherList>::DestroyDataObject

0x0047c140 · 275 bytes · __thiscall

_ZN23CEntityDataInstantiatorI12CWatcherListE17DestroyDataObjectEPK11CBaseEntity

Decompiled

undefined (2 params)

/* CEntityDataInstantiator<CWatcherList>::DestroyDataObject(CBaseEntity const*) */

void __thiscall
CEntityDataInstantiator<CWatcherList>::DestroyDataObject
          (CEntityDataInstantiator<CWatcherList> *this,CBaseEntity *param_1)

{
  undefined4 *puVar1;
  ushort *puVar2;
  char cVar3;
  uint uVar4;
  int *piVar5;
  undefined4 *puVar6;
  int iVar7;
  uint uVar8;
  uint local_34;
  CBaseEntity *local_24;
  undefined4 local_20;
  
  local_20 = 0;
  local_24 = param_1;
  local_34 = (**(code **)(this + 0x1c))(&local_24);
  if (this[0x20] == (CEntityDataInstantiator<CWatcherList>)0x0) {
    local_34 = local_34 % *(uint *)(this + 0x10);
  }
  else {
    local_34 = local_34 & *(uint *)(this + 0x24);
  }
  uVar8 = 0;
  piVar5 = (int *)(*(int *)(this + 4) + local_34 * 0x14);
  uVar4 = piVar5[3];
  if ((int)uVar4 < 1) {
LAB_0047c1b2:
    if ((uVar4 != uVar8) && (uVar4 = local_34 << 0x10 | uVar8, uVar4 != 0xffffffff)) {
      uVar8 = uVar8 & 0xffff;
      iVar7 = (uVar4 >> 0x10) * 0x14;
      piVar5 = (int *)(iVar7 + *(int *)(this + 4));
      puVar2 = *(ushort **)(*piVar5 + 4 + uVar8 * 8);
      if (puVar2 != (ushort *)0x0) {
        CUtlMultiList<watcher_t,unsigned_short>::DestroyList
                  ((CUtlMultiList<watcher_t,unsigned_short> *)&g_WatcherList,*puVar2);
        operator_delete(puVar2);
        piVar5 = (int *)(*(int *)(this + 4) + iVar7);
      }
      iVar7 = piVar5[3];
      if (((int)uVar8 < iVar7) && (0 < iVar7)) {
        uVar4 = iVar7 - 1;
        if (uVar8 != uVar4) {
          puVar1 = (undefined4 *)(*piVar5 + uVar4 * 8);
          puVar6 = (undefined4 *)(uVar8 * 8 + *piVar5);
          *puVar6 = *puVar1;
          puVar6[1] = puVar1[1];
          uVar4 = piVar5[3] - 1;
        }
        piVar5[3] = uVar4;
      }
    }
  }
  else {
    do {
      cVar3 = (**(code **)(this + 0x18))(*piVar5 + uVar8 * 8,&local_24);
      if (cVar3 != '\0') goto LAB_0047c1b2;
      uVar8 = uVar8 + 1;
    } while (uVar8 != uVar4);
  }
  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)