CheckCliff
0x00731270 · 312 bytes · __cdecl
_Z10CheckCliffPK6Vector10NavDirTypeb
Decompiled
undefined (3 params)
/* CheckCliff(Vector const*, NavDirType, bool) */
undefined4 CheckCliff(Vector *param_1,int param_2,char param_3)
{
undefined4 uVar1;
float local_7c;
float local_78;
undefined4 local_74;
CGameTrace local_70 [12];
undefined1 local_64 [8];
float local_5c;
char local_3a;
char local_39;
local_74 = *(undefined4 *)(param_1 + 8);
local_78 = *(float *)(param_1 + 4);
local_7c = *(float *)param_1;
if (param_2 == 1) {
local_7c = local_7c + 25.0;
}
else if (param_2 < 2) {
if (param_2 == 0) {
local_78 = local_78 - 25.0;
}
}
else if (param_2 == 2) {
local_78 = local_78 + 25.0;
}
else if (param_2 == 3) {
local_7c = local_7c - 25.0;
}
uVar1 = TraceAdjacentNode(0,param_1,(Vector *)&local_7c,local_70,4000.0);
if ((char)uVar1 != '\0') {
if ((local_3a == '\0') && (local_39 == '\0')) {
if ((((*(float *)(param_1 + 8) - local_5c <= 300.0) && (uVar1 = 0, param_2 - 1U < 2)) &&
(ABS(*(float *)(param_1 + 8) - local_5c) < 18.0)) && (param_3 != '\0')) {
uVar1 = CheckCliff(local_64,param_2,0);
}
}
else {
uVar1 = 0;
}
}
return uVar1;
}
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.