nav_update_lighting
0x006f8f20 · 170 bytes · __cdecl
_ZL19nav_update_lightingRK8CCommand
Decompiled
undefined (1 param)
/* nav_update_lighting(CCommand const&) */
void nav_update_lighting(CCommand *param_1)
{
char cVar1;
int *piVar2;
int iVar3;
uint uVar4;
if (*(int *)param_1 == 2) {
uVar4 = strtol(*(char **)(param_1 + 0x40c),(char **)0x0,10);
piVar2 = (int *)CNavMesh::GetNavAreaByID(TheNavMesh,uVar4);
if (piVar2 == (int *)0x0) {
uVar4 = 0;
}
else {
uVar4 = (**(code **)(*piVar2 + 0x70))(piVar2);
uVar4 = uVar4 & 0xff;
}
}
else {
iVar3 = 0;
uVar4 = 0;
if (0 < DAT_00fe6000) {
uVar4 = 0;
do {
piVar2 = *(int **)(TheNavAreas + iVar3 * 4);
cVar1 = (**(code **)(*piVar2 + 0x70))(piVar2);
uVar4 = (uVar4 + 1) - (uint)(cVar1 == '\0');
iVar3 = iVar3 + 1;
} while (iVar3 < DAT_00fe6000);
}
}
DevMsg("Computed lighting for %d/%d areas\n",uVar4,DAT_00fe6000);
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.