InfectedChasePath::ComputeAreaCrossing
0x00a2e900 · 310 bytes · __thiscall
_ZNK17InfectedChasePath19ComputeAreaCrossingEP8INextBotPK8CNavAreaRK6VectorS4_10NavDirTypePS5_
Decompiled
undefined (7 params)
/* InfectedChasePath::ComputeAreaCrossing(INextBot*, CNavArea const*, Vector const&, CNavArea
const*, NavDirType, Vector*) const */
void __thiscall
InfectedChasePath::ComputeAreaCrossing
(undefined4 this,int *param_1,CNavArea *param_2,undefined4 param_3,TerrorNavArea *param_4,
uint param_6,float *param_7)
{
char cVar1;
int iVar2;
int *piVar3;
longdouble lVar4;
float fVar5;
float fVar6;
float local_2c;
float local_28;
float local_24;
float local_20;
CNavArea::ComputePortal(param_2,param_4,param_6,&local_28,&local_2c);
if (50.0 < local_2c) {
local_2c = 50.0;
}
*param_7 = local_28;
param_7[1] = local_24;
param_7[2] = local_20;
cVar1 = TerrorNavArea::IsBottleneck(param_4);
if (cVar1 != '\0') {
return;
}
iVar2 = (**(code **)(*param_1 + 0xb4))(param_1);
if (*(int *)(iVar2 + 0x30) == 0) {
iVar2 = 0;
}
else {
iVar2 = *(int *)(iVar2 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
fVar6 = cosf((float)(iVar2 + *(int *)(param_2 + 0x8c) + *(int *)(param_4 + 0x8c)));
fVar5 = local_2c;
piVar3 = (int *)(**(code **)(*param_1 + 0xc4))(param_1);
lVar4 = (longdouble)(**(code **)(*piVar3 + 0x118))(piVar3);
fVar5 = fVar5 - (float)lVar4 * 0.5;
if (fVar5 <= 0.0) {
fVar5 = 0.0;
}
if ((param_6 & 0xfffffffd) == 0) {
*param_7 = fVar5 * fVar6 + *param_7;
return;
}
param_7[1] = fVar5 * fVar6 + param_7[1];
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.