splitX
0x00722180 · 201 bytes · __regparm3
_ZL6splitXP8CNavArea
Decompiled
undefined (1 param)
/* splitX(CNavArea*) */
void __regparm3 splitX(CNavArea *param_1)
{
float fVar1;
char cVar2;
longdouble lVar3;
CNavArea *local_14;
CNavArea *local_10 [2];
cVar2 = CNavArea::IsRoughlySquare();
if (cVar2 == '\0') {
lVar3 = (longdouble)
CNavMesh::SnapToGrid
(TheNavMesh,
(*(float *)(param_1 + 0x10) - *(float *)(param_1 + 4)) * 0.5 +
*(float *)(param_1 + 4),false);
fVar1 = (float)lVar3;
if ((0.1 <= ABS(fVar1 - *(float *)(param_1 + 4))) &&
(0.1 <= ABS(fVar1 - *(float *)(param_1 + 0x10)))) {
cVar2 = CNavArea::SplitEdit(param_1,false,fVar1,&local_14,local_10);
if (cVar2 != '\0') {
splitX(local_14);
splitX(local_10[0]);
}
}
}
return;
}
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.