TerrorNavMesh::SaveCustomData
0x00992ed0 · 205 bytes · __thiscall
_ZNK13TerrorNavMesh14SaveCustomDataER10CUtlBuffer
Decompiled
undefined (2 params)
/* TerrorNavMesh::SaveCustomData(CUtlBuffer&) const */
void __thiscall TerrorNavMesh::SaveCustomData(TerrorNavMesh *this,CUtlBuffer *param_1)
{
float fVar1;
char cVar2;
int iVar3;
void *pvVar4;
undefined1 local_14;
undefined1 uStack_13;
undefined1 uStack_12;
undefined1 uStack_11;
undefined1 local_10;
undefined1 local_f;
undefined1 local_e;
undefined1 local_d;
fVar1 = *(float *)(NavMaxViewDistance._28_4_ + 0x2c);
if (((byte)param_1[0x15] & 1) == 0) {
cVar2 = CUtlBuffer::CheckPut(param_1,4);
if (cVar2 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(float *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = fVar1;
iVar3 = *(int *)(param_1 + 0x10);
}
else {
iVar3 = *(int *)(param_1 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar4 != (void *)0x0) {
uStack_11 = (undefined1)((uint)fVar1 >> 0x18);
local_10 = uStack_11;
uStack_12 = (undefined1)((uint)fVar1 >> 0x10);
local_f = uStack_12;
uStack_13 = (undefined1)((uint)fVar1 >> 8);
local_e = uStack_13;
local_14 = SUB41(fVar1,0);
local_d = local_14;
_V_memcpy(pvVar4,&local_10,4);
iVar3 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(param_1);
return;
}
}
else {
CUtlBuffer::Printf(param_1,"%f",(double)fVar1);
}
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.