SmokerPathCost::operator()
0x00abab50 · 554 bytes · __thiscall
_ZNK14SmokerPathCostclEP8CNavAreaS1_PK10CNavLadderPK13CFuncElevatorf
Decompiled
undefined (6 params)
/* SmokerPathCost::TEMPNAMEPLACEHOLDERVALUE(CNavArea*, CNavArea*, CNavLadder const*, CFuncElevator
const*, float) const */
longdouble __thiscall
SmokerPathCost::operator()
(SmokerPathCost *this,CNavArea *param_1,CNavArea *param_2,CNavLadder *param_3,
CFuncElevator *param_4,float param_5)
{
float fVar1;
CBaseEntity *pCVar2;
char cVar3;
longdouble lVar4;
uint uVar5;
float fVar6;
float fVar7;
Vector local_28 [8];
float local_20;
cVar3 = (**(code **)(**(int **)(this + 8) + 0x150))(*(int **)(this + 8),param_1);
fVar6 = -1.0;
if ((cVar3 != '\0') && (fVar6 = 0.0, param_2 != (CNavArea *)0x0)) {
pCVar2 = *(CBaseEntity **)(this + 0xc);
if (pCVar2 == (CBaseEntity *)0x0) {
fVar7 = 1.0;
}
else {
if (((byte)pCVar2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar2);
}
CNavArea::GetClosestPointOnArea(param_1,(Vector *)(pCVar2 + 0x2e0),local_28);
pCVar2 = *(CBaseEntity **)(this + 0xc);
if (((byte)pCVar2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar2);
}
uVar5 = -(uint)(*(float *)(pCVar2 + 0x2e8) + 100.0 < local_20);
fVar7 = (float)(~uVar5 & 0x40000000 | uVar5 & 0x3f800000);
}
if (param_1[0x7d] != (CNavArea)0x0) {
fVar7 = fVar7 + fVar7;
}
if (param_3 == (CNavLadder *)0x0) {
lVar4 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(param_2,param_1);
fVar1 = (float)lVar4;
lVar4 = (longdouble)(**(code **)(**(int **)(this + 8) + 0x134))(*(int **)(this + 8));
fVar6 = -1.0;
if ((float)lVar4 < fVar1) goto LAB_00abac4c;
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 + 0x34) - *(float *)(param_2 + 0x34)) *
(*(float *)(param_1 + 0x34) - *(float *)(param_2 + 0x34)) +
(*(float *)(param_1 + 0x30) - *(float *)(param_2 + 0x30)) *
(*(float *)(param_1 + 0x30) - *(float *)(param_2 + 0x30)));
}
if (fVar1 < 0.0) {
fVar6 = fVar1 + fVar1;
}
else {
fVar6 = 0.0;
if (fVar1 <= 0.0) {
fVar6 = fVar1;
}
}
fVar6 = ABS(fVar6) + param_5;
if (param_1[0x7e] == (CNavArea)0x0) {
if (param_1[0x7d] != (CNavArea)0x0) {
fVar6 = fVar6 * 5.0;
}
}
else {
fVar6 = fVar6 * 10.0;
}
}
else {
fVar6 = (float)(~-(uint)(*(float *)(param_1 + 0x34) < *(float *)(param_2 + 0x34)) & 0x3f800000
| -(uint)(*(float *)(param_1 + 0x34) < *(float *)(param_2 + 0x34)) & 0x40400000
) * *(float *)(param_3 + 0x1c);
}
fVar6 = fVar6 * fVar7 + *(float *)(param_2 + 0x44);
}
LAB_00abac4c:
return (longdouble)fVar6;
}
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.