L L4D2node

SafeGet<bool>

0x0080b210 · 114 bytes · __regparm3

_Z7SafeGetIbEbP9HSCRIPT__PKcRT_b.isra.68

Decompiled

bool (4 params)

/* bool SafeGet<bool>(HSCRIPT__*, char const*, bool&, bool) [clone .isra.68] */

bool __regparm3 SafeGet<bool>(HSCRIPT__ *param_1,char *param_2,bool *param_3,bool param_4)

{
  char cVar1;
  void *local_28 [2];
  short local_20;
  ushort local_1e;
  
  local_1e = 0;
  local_20 = 0;
  local_28[0] = (void *)0x0;
                    /* try { // try from 0080b248 to 0080b24d has its CatchHandler @ 0080b288 */
  cVar1 = (**(code **)(*g_pScriptVM + 0x90))(g_pScriptVM,param_1,param_2,local_28);
  if (cVar1 != '\0') {
    if (local_20 == 0) {
      cVar1 = '\0';
    }
    else {
      *param_3 = local_28[0]._0_1_;
    }
  }
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  return (bool)cVar1;
}

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)