CNavArea::ComputeSpotEncounters
0x00706200 · 238 bytes · __thiscall
_ZN8CNavArea21ComputeSpotEncountersEv
Decompiled
undefined (1 param)
/* CNavArea::ComputeSpotEncounters() */
void __thiscall CNavArea::ComputeSpotEncounters(CNavArea *this)
{
int *piVar1;
int *piVar2;
int iVar3;
int iVar4;
int local_24;
int local_20;
if (*(undefined4 **)(this + 0xd0) !=
&CUtlVectorUltraConservative<SpotEncounter*,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData) {
free(*(undefined4 **)(this + 0xd0));
*(undefined4 **)(this + 0xd0) =
&CUtlVectorUltraConservative<SpotEncounter*,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData;
}
if (*(int *)(nav_quicksave._28_4_ + 0x30) == 0) {
local_20 = 0;
do {
piVar1 = *(int **)(this + local_20 * 4 + 0x58);
if (0 < *piVar1) {
local_24 = 0;
do {
iVar4 = 0;
do {
piVar2 = *(int **)(this + iVar4 * 4 + 0x58);
if (0 < *piVar2) {
iVar3 = 0;
do {
if (piVar1 + local_24 * 2 + 1 != piVar2 + iVar3 * 2 + 1) {
AddSpotEncounters(this,piVar1[local_24 * 2 + 1],local_20,piVar2[iVar3 * 2 + 1],
iVar4);
piVar2 = *(int **)(this + iVar4 * 4 + 0x58);
}
iVar3 = iVar3 + 1;
} while (iVar3 < *piVar2);
}
iVar4 = iVar4 + 1;
} while (iVar4 != 4);
local_24 = local_24 + 1;
piVar1 = *(int **)(this + local_20 * 4 + 0x58);
} while (local_24 < *piVar1);
}
local_20 = local_20 + 1;
} while (local_20 != 4);
}
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.