CNavMesh::CommandNavStoreSelectedSet
0x0070b2e0 · 435 bytes · __thiscall
_ZN8CNavMesh26CommandNavStoreSelectedSetEv
Decompiled
undefined (1 param)
/* CNavMesh::CommandNavStoreSelectedSet() */
void __thiscall CNavMesh::CommandNavStoreSelectedSet(CNavMesh *this)
{
undefined4 uVar1;
CBaseEntity *this_00;
int iVar2;
void *pvVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
undefined4 *puVar8;
this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
if ((this_00 != (CBaseEntity *)0x0) && (*(uint *)(this + 0x458) < 2)) {
CBaseEntity::EmitSound(this_00,"EDIT_DELETE",0.0,(float *)0x0);
*(undefined4 *)(this + 0x5d0) = 0;
if (0 < *(int *)(this + 0x4e0)) {
iVar5 = 0;
iVar7 = 0;
do {
iVar6 = iVar7 + 1;
uVar1 = *(undefined4 *)(*(int *)(*(int *)(this + 0x4d4) + iVar5 * 4) + 0x8c);
iVar4 = *(int *)(this + 0x5c8);
if (iVar4 < iVar6) {
iVar2 = *(int *)(this + 0x5cc);
if (iVar2 < 0) goto LAB_0070b348;
if (iVar2 == 0) {
if (iVar4 == 0) {
if (iVar6 < 9) {
iVar2 = 8;
goto LAB_0070b3df;
}
iVar4 = 8;
}
do {
iVar2 = iVar4 * 2;
if (iVar6 <= iVar2) break;
iVar2 = iVar4 * 4;
iVar4 = iVar2;
} while (iVar2 < iVar6);
}
else {
for (iVar2 = (iVar7 / iVar2 + 1) * iVar2; iVar2 < iVar6; iVar2 = (iVar2 + iVar6) / 2) {
}
}
LAB_0070b3df:
*(int *)(this + 0x5c8) = iVar2;
if (*(void **)(this + 0x5c4) == (void *)0x0) {
pvVar3 = malloc(iVar2 << 2);
*(void **)(this + 0x5c4) = pvVar3;
}
else {
pvVar3 = realloc(*(void **)(this + 0x5c4),iVar2 << 2);
*(void **)(this + 0x5c4) = pvVar3;
iVar6 = *(int *)(this + 0x5d0) + 1;
}
}
else {
LAB_0070b348:
pvVar3 = *(void **)(this + 0x5c4);
}
*(int *)(this + 0x5d0) = iVar6;
iVar6 = (iVar6 - iVar7) + -1;
*(void **)(this + 0x5d4) = pvVar3;
if (0 < iVar6) {
_V_memmove((void *)((int)pvVar3 + iVar7 * 4 + 4),(void *)((int)pvVar3 + iVar7 * 4),
iVar6 * 4);
pvVar3 = *(void **)(this + 0x5c4);
}
puVar8 = (undefined4 *)(iVar7 * 4 + (int)pvVar3);
if (puVar8 != (undefined4 *)0x0) {
*puVar8 = uVar1;
}
iVar5 = iVar5 + 1;
if (*(int *)(this + 0x4e0) <= iVar5) {
return;
}
iVar7 = *(int *)(this + 0x5d0);
} while( true );
}
}
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.