L L4D2node

CRestore::FindField

0x004a94f0 · 114 bytes · __thiscall

_ZN8CRestore9FindFieldEPKcP17typedescription_tiPi

Decompiled

undefined (5 params)

/* CRestore::FindField(char const*, typedescription_t*, int, int*) */

typedescription_t * __thiscall
CRestore::FindField(CRestore *this,char *param_1,typedescription_t *param_2,int param_3,int *param_4
                   )

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  if ((param_1 != (char *)0x0) && (0 < param_3)) {
    iVar3 = 0;
    do {
      iVar1 = *param_4;
      iVar2 = iVar1 + 1;
      if (param_3 == iVar2) {
        iVar2 = 0;
      }
      *param_4 = iVar2;
      iVar2 = _V_stricmp(*(char **)(param_2 + iVar1 * 0x40 + 4),param_1);
      if (iVar2 == 0) {
        return param_2 + iVar1 * 0x40;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != param_3);
  }
  *param_4 = 0;
  return (typedescription_t *)0x0;
}

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)