L L4D2node

CDmxElement::AddAttribute

0x00be72c0 · 129 bytes · __thiscall

_ZN11CDmxElement12AddAttributeEPKc

Decompiled

undefined (2 params)

/* CDmxElement::AddAttribute(char const*) */

CDmxAttribute * __thiscall CDmxElement::AddAttribute(CDmxElement *this,char *param_1)

{
  int iVar1;
  CDmxAttribute *pCVar2;
  CDmxAttribute *local_20 [4];
  
  iVar1 = FindAttribute(this,param_1);
  if (-1 < iVar1) {
    return *(CDmxAttribute **)(*(int *)this + iVar1 * 4);
  }
  this[0x2e] = (CDmxElement)((char)this[0x2e] + '\x01');
  this[0x2f] = (CDmxElement)((byte)this[0x2f] | 1);
                    /* try { // try from 00be72ff to 00be7323 has its CatchHandler @ 00be7345 */
  pCVar2 = (CDmxAttribute *)DMXAlloc(0xc);
  CDmxAttribute::CDmxAttribute(pCVar2,param_1);
  local_20[0] = pCVar2;
  CUtlSortVector<CDmxAttribute*,CDmxAttributeLess>::InsertNoSort
            ((CUtlSortVector<CDmxAttribute*,CDmxAttributeLess> *)this,local_20);
  pCVar2 = local_20[0];
  LockForChanges(this,false);
  return pCVar2;
}

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)