L L4D2node

SafeGet<float>

0x0080b350 · 138 bytes · __regparm3

_Z7SafeGetIfEbP9HSCRIPT__PKcRT_b.isra.70

Decompiled

bool (4 params)

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

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

{
  char cVar1;
  void *pvVar2;
  void *local_28 [2];
  short local_20;
  ushort local_1e;
  
  local_1e = 0;
  local_20 = 0;
  local_28[0] = (void *)0x0;
                    /* try { // try from 0080b388 to 0080b38d has its CatchHandler @ 0080b3db */
  cVar1 = (**(code **)(*g_pScriptVM + 0x90))(g_pScriptVM,param_1,param_2,local_28);
  if (cVar1 != '\0') {
    if (local_20 == 0) {
      cVar1 = '\0';
    }
    else {
      pvVar2 = local_28[0];
      if (local_20 != 1) {
        pvVar2 = (void *)(float)(int)local_28[0];
      }
      *param_3 = (float)pvVar2;
    }
  }
  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)