L L4D2node

CFindEntityCache::Insert

0x009f4880 · 138 bytes · __thiscall

_ZN16CFindEntityCache6InsertEiPKc

Decompiled

undefined (3 params)

/* CFindEntityCache::Insert(int, char const*) */

int * __thiscall CFindEntityCache::Insert(CFindEntityCache *this,int param_1,char *param_2)

{
  undefined2 uVar1;
  int *piVar2;
  undefined4 *puVar3;
  
  piVar2 = (int *)CGlobalEntityList::FindEntityByName
                            ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,param_2,
                             (CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                             (IEntityFindFilter *)0x0);
  if (piVar2 == (int *)0x0) {
    piVar2 = (int *)0x0;
  }
  else {
    if (param_1 < 0) {
      param_1 = 7;
    }
    puVar3 = (undefined4 *)(**(code **)(*piVar2 + 0xc))(piVar2);
    *(undefined4 *)(this + param_1 * 4) = *puVar3;
    uVar1 = HashStringCaseless(param_2);
    *(undefined2 *)(this + param_1 * 2 + 0x20) = uVar1;
  }
  return piVar2;
}

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)