Path::BuildTrivialPath
0x00761830 · 542 bytes · __thiscall
_ZN4Path16BuildTrivialPathEP8INextBotRK6Vector
Decompiled
undefined (3 params)
/* Path::BuildTrivialPath(INextBot*, Vector const&) */
undefined4 __thiscall Path::BuildTrivialPath(Path *this,INextBot *param_1,Vector *param_2)
{
Vector *pVVar1;
CNavArea *this_00;
CNavArea *this_01;
longdouble lVar2;
pVVar1 = (Vector *)(**(code **)(*(int *)param_1 + 0xd4))(param_1);
*(undefined4 *)(this + 0x4404) = 0;
this_00 = (CNavArea *)
CNavMesh::GetNearestNavArea(TheNavMesh,pVVar1,false,10000.0,false,true,false);
if (this_00 != (CNavArea *)0x0) {
this_01 = (CNavArea *)
CNavMesh::GetNearestNavArea(TheNavMesh,param_2,false,10000.0,false,true,false);
if (this_01 != (CNavArea *)0x0) {
*(undefined4 *)(this + 0x4404) = 2;
*(CNavArea **)(this + 4) = this_00;
*(undefined4 *)(this + 0xc) = *(undefined4 *)pVVar1;
*(undefined4 *)(this + 0x10) = *(undefined4 *)(pVVar1 + 4);
lVar2 = (longdouble)CNavArea::GetZ(this_00,*(float *)pVVar1,*(float *)(pVVar1 + 4));
*(undefined4 *)(this + 0x18) = 0;
*(undefined4 *)(this + 8) = 9;
*(undefined4 *)(this + 0x1c) = 0;
*(CNavArea **)(this + 0x48) = this_01;
*(float *)(this + 0x14) = (float)lVar2;
*(undefined4 *)(this + 0x50) = *(undefined4 *)param_2;
*(undefined4 *)(this + 0x54) = *(undefined4 *)(param_2 + 4);
lVar2 = (longdouble)CNavArea::GetZ(this_01,*(float *)param_2,*(float *)(param_2 + 4));
*(undefined4 *)(this + 0x5c) = 0;
*(undefined4 *)(this + 0x4c) = 9;
*(float *)(this + 0x58) = (float)lVar2;
*(undefined4 *)(this + 0x60) = 0;
*(float *)(this + 0x24) = *(float *)(this + 0x54) - *(float *)(this + 0x10);
*(float *)(this + 0x28) = (float)lVar2 - *(float *)(this + 0x14);
*(float *)(this + 0x20) = *(float *)(this + 0x50) - *(float *)(this + 0xc);
lVar2 = (longdouble)VectorNormalize((Vector *)(this + 0x20));
*(undefined4 *)(this + 0x30) = 0;
*(undefined4 *)(this + 0x34) = 0;
*(undefined4 *)(this + 100) = *(undefined4 *)(this + 0x20);
*(undefined4 *)(this + 0x70) = 0;
*(undefined4 *)(this + 0x68) = *(undefined4 *)(this + 0x24);
*(float *)(this + 0x2c) = (float)lVar2;
*(undefined4 *)(this + 0x6c) = *(undefined4 *)(this + 0x28);
*(float *)(this + 0x74) = (float)lVar2;
*(undefined4 *)(this + 0x78) = 0;
(**(code **)(*(int *)this + 100))(this,param_1,0);
return 1;
}
}
return 0;
}
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.