L L4D2node

CDmxElementDictionary::FindElement

0x00beb5b0 · 49 bytes · __thiscall

_ZN21CDmxElementDictionary11FindElementEP11CDmxElement

Decompiled

undefined (2 params)

/* CDmxElementDictionary::FindElement(CDmxElement*) */

int __thiscall CDmxElementDictionary::FindElement(CDmxElementDictionary *this,CDmxElement *param_1)

{
  CDmxElement *pCVar1;
  int iVar2;
  int *piVar3;
  
  if (*(int *)(this + 0xc) < 1) {
LAB_00beb5de:
    iVar2 = -1;
  }
  else {
    piVar3 = *(int **)this;
    iVar2 = 0;
    pCVar1 = (CDmxElement *)*piVar3;
    while (pCVar1 != param_1) {
      iVar2 = iVar2 + 1;
      if (iVar2 == *(int *)(this + 0xc)) goto LAB_00beb5de;
      piVar3 = piVar3 + 5;
      pCVar1 = (CDmxElement *)*piVar3;
    }
  }
  return iVar2;
}

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)