Path::ComputeAreaCrossing
0x0075f370 · 413 bytes · __thiscall
_ZNK4Path19ComputeAreaCrossingEP8INextBotPK8CNavAreaRK6VectorS4_10NavDirTypePS5_
Decompiled
undefined (7 params)
/* Path::ComputeAreaCrossing(INextBot*, CNavArea const*, Vector const&, CNavArea const*, NavDirType,
Vector*) const */
void __thiscall
Path::ComputeAreaCrossing
(undefined4 this,int *param_1,CNavArea *param_2,undefined4 param_3,int param_4,
uint param_6,float *param_7)
{
int iVar1;
int *piVar2;
longdouble lVar3;
float fVar4;
if (param_1 != (int *)0x0) {
iVar1 = (**(code **)(*param_1 + 0xc4))(param_1);
if (iVar1 != 0) {
piVar2 = (int *)(**(code **)(*param_1 + 0xc4))(param_1);
lVar3 = (longdouble)(**(code **)(*piVar2 + 0x118))(piVar2);
fVar4 = (float)lVar3 * 0.5 + 5.0;
goto LAB_0075f3d4;
}
}
fVar4 = 0.0;
LAB_0075f3d4:
CNavArea::ComputeClosestPointInPortal(param_2,param_4,param_6,param_3,param_7,fVar4);
if ((param_6 & 0xfffffffd) == 0) {
fVar4 = *(float *)(param_4 + 0x14) - *(float *)(param_4 + 8);
}
else {
fVar4 = *(float *)(param_4 + 0x10) - *(float *)(param_4 + 4);
}
piVar2 = (int *)(**(code **)(*param_1 + 0xc4))(param_1);
lVar3 = (longdouble)(**(code **)(*piVar2 + 0x118))(piVar2);
fVar4 = fVar4 * 0.5 * 0.8;
if ((float)lVar3 * 0.5 < fVar4) {
piVar2 = (int *)(**(code **)(*param_1 + 0xc4))(param_1);
lVar3 = (longdouble)(**(code **)(*piVar2 + 0x118))(piVar2);
fVar4 = (float)lVar3 * 0.5;
}
if (param_6 != 1) {
if ((int)param_6 < 2) {
if (param_6 == 0) {
param_7[1] = param_7[1] - fVar4;
return;
}
}
else {
if (param_6 == 2) {
param_7[1] = fVar4 + param_7[1];
return;
}
if (param_6 == 3) {
*param_7 = *param_7 - fVar4;
}
}
return;
}
*param_7 = fVar4 + *param_7;
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.