L L4D2node

CDmxElement::RemoveAttributeByPtr

0x00be7e20 · 106 bytes · __thiscall

_ZN11CDmxElement20RemoveAttributeByPtrEP13CDmxAttribute

Decompiled

undefined (2 params)

/* CDmxElement::RemoveAttributeByPtr(CDmxAttribute*) */

void __thiscall CDmxElement::RemoveAttributeByPtr(CDmxElement *this,CDmxAttribute *param_1)

{
  CDmxAttribute *pCVar1;
  int iVar2;
  
  this[0x2e] = (CDmxElement)((char)this[0x2e] + '\x01');
  if (0 < *(int *)(this + 0xc)) {
    iVar2 = 0;
    pCVar1 = (CDmxAttribute *)**(int **)this;
    while (pCVar1 != param_1) {
      iVar2 = iVar2 + 1;
      if (iVar2 == *(int *)(this + 0xc)) goto LAB_00be7e54;
      pCVar1 = (CDmxAttribute *)(*(int **)this)[iVar2];
    }
    if (param_1 != (CDmxAttribute *)0x0) {
      CDmxAttribute::~CDmxAttribute(param_1);
    }
                    /* try { // try from 00be7e8b to 00be7e8f has its CatchHandler @ 00be7e96 */
    CUtlVector<CDmxAttribute*,CUtlMemory<CDmxAttribute*,int>>::ShiftElementsLeft
              ((CUtlVector<CDmxAttribute*,CUtlMemory<CDmxAttribute*,int>> *)this,iVar2,1);
    *(int *)(this + 0xc) = *(int *)(this + 0xc) + -1;
  }
LAB_00be7e54:
  LockForChanges(this,false);
  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)