JockeyRidePathCost::operator()
0x00aa6530 · 538 bytes · __thiscall
_ZNK18JockeyRidePathCostclEP8CNavAreaS1_PK10CNavLadderPK13CFuncElevatorf
Decompiled
undefined (6 params)
/* JockeyRidePathCost::TEMPNAMEPLACEHOLDERVALUE(CNavArea*, CNavArea*, CNavLadder const*,
CFuncElevator const*, float) const */
longdouble __thiscall
JockeyRidePathCost::operator()
(JockeyRidePathCost *this,CNavArea *param_1,CNavArea *param_2,CNavLadder *param_3,
CFuncElevator *param_4,float param_5)
{
float fVar1;
char cVar2;
uint uVar3;
int iVar4;
longdouble lVar5;
float fVar6;
if (this[0xc] == (JockeyRidePathCost)0x0) {
uVar3 = *(uint *)(param_1 + 0x54);
}
else if (((param_3 != (CNavLadder *)0x0) ||
(iVar4 = TerrorNavArea::GetDoor((TerrorNavArea *)param_1), iVar4 != 0)) ||
(uVar3 = *(uint *)(param_1 + 0x54), (uVar3 & 2) != 0)) goto LAB_00aa654b;
if (((uVar3 & 1) == 0) &&
(cVar2 = (**(code **)(**(int **)(this + 8) + 0x150))(*(int **)(this + 8),param_1),
cVar2 != '\0')) {
if (param_2 == (CNavArea *)0x0) {
return (longdouble)0;
}
lVar5 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(param_2,param_1);
fVar1 = (float)lVar5;
if ((((this[0xc] == (JockeyRidePathCost)0x0) ||
(lVar5 = (longdouble)(**(code **)(**(int **)(this + 8) + 0x130))(*(int **)(this + 8)),
fVar1 <= (float)lVar5)) &&
((lVar5 = (longdouble)(**(code **)(**(int **)(this + 8) + 0x134))(*(int **)(this + 8)),
fVar1 <= (float)lVar5 || (param_3 != (CNavLadder *)0x0)))) &&
((uVar3 = *(uint *)(param_1 + 0x54), this[0xc] == (JockeyRidePathCost)0x0 ||
((uVar3 & 0x40000) == 0)))) {
fVar6 = 10.0;
if ((uVar3 & 0x80) == 0) {
fVar6 = 1.0;
}
if (param_1[0x7e] == (CNavArea)0x0) {
if (param_1[0x7d] != (CNavArea)0x0) {
fVar6 = fVar6 * 5.0;
}
}
else {
fVar6 = fVar6 * 10.0;
}
if ((param_1[0x3a] != (CNavArea)0x0) && (18.0 < (float)(byte)param_1[0x3a] + 0.0)) {
fVar6 = fVar6 * 20.0;
}
if ((uVar3 & 0x80000) != 0) {
fVar6 = fVar6 * 10.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)));
}
return (longdouble)(*(float *)(param_2 + 0x44) + (param_5 + ABS(fVar1)) * fVar6);
}
}
LAB_00aa654b:
return -(longdouble)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.