InfectedFleePathCost::operator()
0x00a34130 · 516 bytes · __thiscall
_ZNK20InfectedFleePathCostclEP8CNavAreaS1_PK10CNavLadderPK13CFuncElevatorf
Decompiled
undefined (6 params)
/* InfectedFleePathCost::TEMPNAMEPLACEHOLDERVALUE(CNavArea*, CNavArea*, CNavLadder const*,
CFuncElevator const*, float) const */
longdouble __thiscall
InfectedFleePathCost::operator()
(InfectedFleePathCost *this,CNavArea *param_1,CNavArea *param_2,CNavLadder *param_3,
CFuncElevator *param_4,float param_5)
{
char cVar1;
int iVar2;
longdouble lVar3;
uint uVar4;
float fVar5;
float fVar6;
cVar1 = (**(code **)(**(int **)(this + 8) + 0x150))(*(int **)(this + 8),param_1);
fVar5 = -1.0;
if ((cVar1 == '\0') || (fVar5 = 0.0, param_2 == (CNavArea *)0x0)) goto LAB_00a341a0;
if (param_3 == (CNavLadder *)0x0) {
iVar2 = TerrorNavArea::GetDoor((TerrorNavArea *)param_1);
if ((iVar2 == 0) && (((byte)param_1[0x54] & 1) == 0)) {
lVar3 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(param_2,param_1);
fVar5 = (float)lVar3;
lVar3 = (longdouble)(**(code **)(**(int **)(this + 8) + 0x134))(*(int **)(this + 8));
if (fVar5 <= (float)lVar3) {
lVar3 = (longdouble)(**(code **)(**(int **)(this + 8) + 0x130))(*(int **)(this + 8));
fVar6 = (float)(~-(uint)((float)lVar3 < fVar5) & 0x3f800000 |
-(uint)((float)lVar3 < fVar5) & 0x41a00000);
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) {
uVar4 = -(uint)((float)(byte)param_1[0x3a] + 0.0 <= 18.0);
fVar6 = (float)(~uVar4 & (uint)(fVar6 * 20.0) | (uint)fVar6 & uVar4);
}
if ((*(uint *)(param_1 + 0x54) & 0x80000) != 0) {
fVar6 = fVar6 * 10.0;
}
if ((*(uint *)(param_1 + 0x54) & 0x80) != 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 + 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)));
}
fVar5 = param_5 + ABS(fVar5);
goto LAB_00a34197;
}
}
fVar5 = -1.0;
}
else {
fVar6 = (float)(~-(uint)(*(float *)(param_1 + 0x34) < *(float *)(param_2 + 0x34)) & 0x41a00000 |
-(uint)(*(float *)(param_1 + 0x34) < *(float *)(param_2 + 0x34)) & 0x40400000);
fVar5 = *(float *)(param_3 + 0x1c);
LAB_00a34197:
fVar5 = fVar6 * fVar5 + *(float *)(param_2 + 0x44);
}
LAB_00a341a0:
return (longdouble)fVar5;
}
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.