WanderingWitchPathCost::operator()
0x00a465b0 · 326 bytes · __thiscall
_ZNK22WanderingWitchPathCostclEP8CNavAreaS1_PK10CNavLadderPK13CFuncElevatorf
Decompiled
undefined (6 params)
/* WanderingWitchPathCost::TEMPNAMEPLACEHOLDERVALUE(CNavArea*, CNavArea*, CNavLadder const*,
CFuncElevator const*, float) const */
longdouble __thiscall
WanderingWitchPathCost::operator()
(WanderingWitchPathCost *this,CNavArea *param_1,CNavArea *param_2,CNavLadder *param_3,
CFuncElevator *param_4,float param_5)
{
char cVar1;
longdouble lVar2;
float fVar3;
float fVar4;
if ((((byte)param_1[0x56] & 8) == 0) && (((byte)param_1[0x12e] & 8) == 0)) {
cVar1 = (**(code **)(**(int **)(this + 0xc) + 0x150))(*(int **)(this + 0xc),param_1);
if (cVar1 != '\0') {
fVar3 = 0.0;
if (param_2 == (CNavArea *)0x0) goto LAB_00a465d1;
if (param_3 == (CNavLadder *)0x0) {
lVar2 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(param_2,param_1);
fVar3 = -1.0;
fVar4 = (float)lVar2;
if (ABS(fVar4) <= 16.0) {
if (param_5 <= 0.0) {
param_5 = SQRT((*(float *)(param_1 + 0x2c) - *(float *)(param_2 + 0x2c)) *
(*(float *)(param_1 + 0x2c) - *(float *)(param_2 + 0x2c)) +
(*(float *)(param_1 + 0x30) - *(float *)(param_2 + 0x30)) *
(*(float *)(param_1 + 0x30) - *(float *)(param_2 + 0x30)) +
(*(float *)(param_1 + 0x34) - *(float *)(param_2 + 0x34)) *
(*(float *)(param_1 + 0x34) - *(float *)(param_2 + 0x34)));
}
if (fVar4 < 0.0) {
fVar4 = fVar4 * 5.0;
}
fVar3 = ABS((float)(~-(uint)(24.0 <= fVar4) & 0x3f800000 |
-(uint)(24.0 <= fVar4) & 0x40800000) * fVar4);
if (3.0 < fVar3) {
param_5 = fVar3 + param_5;
}
fVar3 = param_5 + *(float *)(param_2 + 0x44);
}
goto LAB_00a465d1;
}
}
}
fVar3 = -1.0;
LAB_00a465d1:
return (longdouble)fVar3;
}
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.