L L4D2node

CBaseEntity::FindContextByName

0x0060d1d0 · 93 bytes · __thiscall

_ZNK11CBaseEntity17FindContextByNameEPKc

Decompiled

undefined (2 params)

/* CBaseEntity::FindContextByName(char const*) const */

int __thiscall CBaseEntity::FindContextByName(CBaseEntity *this,char *param_1)

{
  int iVar1;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  iVar1 = *(int *)(this + 0xc4);
  if (0 < iVar1) {
    iVar4 = 0;
    do {
      pcVar2 = (char *)GetContextName(this,iVar4);
      if (pcVar2 == param_1) {
        return iVar4;
      }
      iVar3 = _V_stricmp(param_1,pcVar2);
      if (iVar3 == 0) {
        return iVar4;
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != iVar1);
  }
  return -1;
}

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)