NavEditClearAttribute
0x0073e980 · 225 bytes · __cdecl
_Z21NavEditClearAttributeRK8CCommand
Decompiled
undefined (1 param)
/* NavEditClearAttribute(CCommand const&) */
void NavEditClearAttribute(CCommand *param_1)
{
uint *puVar1;
int iVar2;
CNavMesh *pCVar3;
char cVar4;
uint uVar5;
undefined1 *puVar6;
int iVar7;
if (*(int *)param_1 != 2) {
if (*(int *)param_1 < 1) {
puVar6 = &DAT_00d539c2;
}
else {
puVar6 = *(undefined1 **)(param_1 + 0x408);
}
Msg("Usage: %s <attribute>\n",puVar6);
return;
}
uVar5 = NameToNavAttribute(*(char **)(param_1 + 0x40c));
pCVar3 = TheNavMesh;
if (uVar5 != 0) {
cVar4 = CNavMesh::IsSelectedSetEmpty(TheNavMesh);
if (cVar4 == '\0') {
iVar7 = 0;
if (0 < *(int *)(pCVar3 + 0x4e0)) {
do {
iVar2 = iVar7 * 4;
iVar7 = iVar7 + 1;
puVar1 = (uint *)(*(int *)(*(int *)(pCVar3 + 0x4d4) + iVar2) + 0x54);
*puVar1 = *puVar1 & ~uVar5;
} while (iVar7 < *(int *)(pCVar3 + 0x4e0));
}
}
else if (*(int *)(pCVar3 + 0x474) != 0) {
puVar1 = (uint *)(*(int *)(pCVar3 + 0x474) + 0x54);
*puVar1 = *puVar1 & ~uVar5;
}
CNavMesh::ClearSelectedSet(TheNavMesh);
return;
}
puVar6 = &DAT_00d539c2;
if (1 < *(int *)param_1) {
puVar6 = *(undefined1 **)(param_1 + 0x40c);
}
Msg("Unknown attribute \'%s\'",puVar6);
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.