L L4D2node

ReadCorner

0x00736800 · 187 bytes · __cdecl

_Z10ReadCornerP9KeyValuesPKc

Decompiled

undefined (2 params)

/* ReadCorner(KeyValues*, char const*) */

KeyValues * ReadCorner(KeyValues *param_1,char *param_2)

{
  KeyValues *this;
  longdouble lVar1;
  char *in_stack_0000000c;
  
  *(undefined4 *)param_1 = vec3_origin;
  *(undefined4 *)(param_1 + 4) = DAT_01053d4c;
  *(undefined4 *)(param_1 + 8) = DAT_01053d50;
  this = (KeyValues *)KeyValues::FindKey((KeyValues *)param_2,in_stack_0000000c,false);
  if (this != (KeyValues *)0x0) {
    lVar1 = (longdouble)KeyValues::GetFloat(this,"x",0.0);
    *(float *)param_1 = (float)lVar1;
    lVar1 = (longdouble)KeyValues::GetFloat(this,"y",0.0);
    *(float *)(param_1 + 4) = (float)lVar1;
    lVar1 = (longdouble)KeyValues::GetFloat(this,"z",0.0);
    *(float *)(param_1 + 8) = (float)lVar1;
  }
  return param_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)