L L4D2node

CDmxElement::RenameAttribute

0x00be7420 · 147 bytes · __thiscall

_ZN11CDmxElement15RenameAttributeEPKcS1_

Decompiled

undefined (3 params)

/* CDmxElement::RenameAttribute(char const*, char const*) */

void __thiscall CDmxElement::RenameAttribute(CDmxElement *this,char *param_1,char *param_2)

{
  int iVar1;
  int iVar2;
  
  this[0x2e] = (CDmxElement)((char)this[0x2e] + '\x01');
                    /* try { // try from 00be743d to 00be7441 has its CatchHandler @ 00be74ba */
  iVar1 = _V_stricmp(param_1,param_2);
  if (iVar1 != 0) {
                    /* try { // try from 00be7467 to 00be74b7 has its CatchHandler @ 00be74ba */
    iVar1 = FindAttribute(this,param_1);
    if (-1 < iVar1) {
      iVar2 = FindAttribute(this,param_2);
      if (iVar2 < 0) {
        this[0x2f] = (CDmxElement)((byte)this[0x2f] | 1);
        CDmxAttribute::SetName(*(char **)(*(int *)this + iVar1 * 4));
      }
      else {
        Warning("Tried to rename from \"%s\" to \"%s\", but \"%s\" already exists!\n",param_1,
                param_2,param_2);
      }
    }
  }
  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)