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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.