Subdivider::SubdivideY
0x007313c0 · 438 bytes · __thiscall
_ZN10Subdivider10SubdivideYEP8CNavAreabbi
Decompiled
undefined (5 params)
/* Subdivider::SubdivideY(CNavArea*, bool, bool, int) */
void __thiscall
Subdivider::SubdivideY(Subdivider *this,CNavArea *param_1,bool param_2,bool param_3,int param_4)
{
int iVar1;
char cVar2;
longdouble lVar3;
float fVar4;
CNavArea *local_14;
CNavArea *local_10;
if (param_3) {
fVar4 = (*(float *)(param_1 + 0x14) - *(float *)(param_1 + 8)) * 0.5;
if (25.0 <= fVar4) {
lVar3 = (longdouble)CNavMesh::SnapToGrid(TheNavMesh,fVar4 + *(float *)(param_1 + 8),false);
cVar2 = CNavArea::SplitEdit(param_1,true,(float)lVar3,&local_14,&local_10);
if (cVar2 != '\0') {
SubdivideX(this,local_14,param_2,true,param_4 + -1);
SubdivideX(this,local_10,param_2,true,param_4 + -1);
}
}
else if ((param_2) && (iVar1 = param_4 + -1, 0 < iVar1)) {
fVar4 = (*(float *)(param_1 + 0x10) - *(float *)(param_1 + 4)) * 0.5;
if (25.0 <= fVar4) {
lVar3 = (longdouble)CNavMesh::SnapToGrid(TheNavMesh,fVar4 + *(float *)(param_1 + 4),false);
cVar2 = CNavArea::SplitEdit(param_1,false,(float)lVar3,&local_14,&local_10);
if (cVar2 != '\0') {
SubdivideY(this,local_14,true,false,iVar1);
SubdivideY(this,local_10,true,false,iVar1);
}
}
}
}
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.