TerrorNavMesh::GetCheckpoint
0x0086ae80 · 218 bytes · __thiscall
_ZNK13TerrorNavMesh13GetCheckpointERK6Vector
Decompiled
undefined (2 params)
/* TerrorNavMesh::GetCheckpoint(Vector const&) const */
int __thiscall TerrorNavMesh::GetCheckpoint(TerrorNavMesh *this,Vector *param_1)
{
int iVar1;
int iVar2;
int iVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
iVar3 = 10;
fVar4 = 100.0;
do {
fVar6 = *(float *)(param_1 + 8) - fVar4;
fVar5 = *(float *)param_1 - fVar4;
fVar7 = *(float *)(param_1 + 4) - fVar4;
if (0 < *(int *)(this + 0x670)) {
iVar2 = 0;
do {
iVar1 = *(int *)(*(int *)(this + 0x664) + iVar2 * 4);
if ((((*(float *)(iVar1 + 0x18) <= fVar4 + *(float *)param_1) &&
(fVar5 < *(float *)(iVar1 + 0x24) || fVar5 == *(float *)(iVar1 + 0x24))) &&
(*(float *)(iVar1 + 0x1c) <= fVar4 + *(float *)(param_1 + 4))) &&
(((fVar7 < *(float *)(iVar1 + 0x28) || fVar7 == *(float *)(iVar1 + 0x28) &&
(*(float *)(iVar1 + 0x20) <= fVar4 + *(float *)(param_1 + 8))) &&
(fVar6 < *(float *)(iVar1 + 0x2c) || fVar6 == *(float *)(iVar1 + 0x2c))))) {
return iVar1;
}
iVar2 = iVar2 + 1;
} while (iVar2 != *(int *)(this + 0x670));
}
iVar3 = iVar3 + -1;
fVar4 = fVar4 + 100.0;
if (iVar3 == 0) {
return 0;
}
} while( true );
}
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.