CNavLadder::GetPosAtHeight
0x00732070 · 186 bytes · __cdecl
_ZNK10CNavLadder14GetPosAtHeightEf
Decompiled
undefined (1 param)
/* CNavLadder::GetPosAtHeight(float) const */
void CNavLadder::GetPosAtHeight(float param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
undefined4 uVar5;
float fVar6;
float fVar7;
int in_stack_00000008;
float in_stack_0000000c;
fVar1 = *(float *)(in_stack_00000008 + 0x18);
if (in_stack_0000000c < fVar1) {
*(undefined4 *)param_1 = *(undefined4 *)(in_stack_00000008 + 0x10);
uVar5 = *(undefined4 *)(in_stack_00000008 + 0x18);
*(undefined4 *)((int)param_1 + 4) = *(undefined4 *)(in_stack_00000008 + 0x14);
*(undefined4 *)((int)param_1 + 8) = uVar5;
return;
}
fVar2 = *(float *)(in_stack_00000008 + 0xc);
if ((in_stack_0000000c <= fVar2) && (fVar1 != fVar2)) {
fVar3 = *(float *)(in_stack_00000008 + 0x10);
fVar4 = *(float *)(in_stack_00000008 + 4);
fVar6 = (in_stack_0000000c - fVar1) / (fVar2 - fVar1);
fVar7 = 1.0 - fVar6;
*(float *)((int)param_1 + 4) =
*(float *)(in_stack_00000008 + 0x14) * fVar7 + *(float *)(in_stack_00000008 + 8) * fVar6;
*(float *)param_1 = fVar3 * fVar7 + fVar4 * fVar6;
*(float *)((int)param_1 + 8) = fVar1 * fVar7 + fVar6 * fVar2;
return;
}
*(undefined4 *)param_1 = *(undefined4 *)(in_stack_00000008 + 4);
uVar5 = *(undefined4 *)(in_stack_00000008 + 0xc);
*(undefined4 *)((int)param_1 + 4) = *(undefined4 *)(in_stack_00000008 + 8);
*(undefined4 *)((int)param_1 + 8) = uVar5;
return;
}
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.