TerrorNavArea::DrawFog
0x00973d40 · 983 bytes · __thiscall
_ZNK13TerrorNavArea7DrawFogERK6Vectorb
Decompiled
undefined (3 params)
/* TerrorNavArea::DrawFog(Vector const&, bool) const */
void __thiscall TerrorNavArea::DrawFog(TerrorNavArea *this,Vector *param_1,bool param_2)
{
float fVar1;
uint uVar2;
char *pcVar3;
char cVar4;
float local_58;
float local_54;
float local_50;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
undefined4 local_28;
undefined4 local_24;
float local_20;
cVar4 = '\x04';
uVar2 = *(uint *)(this + 0x160);
if (uVar2 != 0) {
cVar4 = (uVar2 != *(uint *)(TheNavMesh + 0x660)) + '\x02';
}
local_50 = *(float *)(this + 0xc);
local_58 = *(float *)(this + 4);
local_48 = *(float *)(this + 8);
local_34 = *(float *)(this + 0x10);
local_3c = *(float *)(this + 0x14);
local_44 = *(float *)(this + 0x24);
local_38 = *(float *)(this + 0x28);
local_2c = *(float *)(this + 0x18);
if (param_2) {
local_58 = local_58 + *(float *)param_1;
local_4c = local_34 + *(float *)param_1;
local_54 = local_48 + *(float *)(param_1 + 4);
local_3c = local_3c + *(float *)(param_1 + 4);
fVar1 = *(float *)(param_1 + 8);
local_50 = local_50 + fVar1;
local_44 = local_44 + fVar1;
local_38 = local_38 + fVar1;
local_2c = local_2c + fVar1;
local_48 = local_54;
local_40 = local_58;
local_34 = local_4c;
local_30 = local_3c;
NavDrawFilledTriangle(&local_58,&local_34,&local_4c,cVar4,1);
NavDrawFilledTriangle(&local_34,&local_58,&local_40,cVar4,1);
return;
}
local_30 = local_3c;
local_4c = local_34;
local_40 = local_58;
local_54 = local_48;
if (this == *(TerrorNavArea **)(TheNavMesh + 0x474)) {
pcVar3 = "";
if ((uVar2 != 0) &&
((*(uint *)(TheNavMesh + 0x658) < uVar2 ||
(pcVar3 = *(char **)(*(int *)(TheNavMesh + 0x64c) + -4 + uVar2 * 4), pcVar3 == (char *)0x0))
)) {
pcVar3 = "INVALID";
cVar4 = '\x04';
}
local_28 = *(undefined4 *)(this + 0x2c);
local_24 = *(undefined4 *)(this + 0x30);
local_20 = *(float *)(this + 0x34) + 16.0;
NDebugOverlay::Text((Vector *)&local_28,pcVar3,true,0.01023);
}
local_58 = local_58 + 0.2;
local_54 = local_54 + 0.2;
local_4c = local_4c - 0.2;
local_48 = local_48 + 0.2;
local_40 = local_40 + 0.2;
local_3c = local_3c - 0.2;
local_34 = local_34 - 0.2;
local_30 = local_30 - 0.2;
NavDrawLine(&local_58,&local_4c,cVar4);
NavDrawLine(&local_4c,&local_34,cVar4);
NavDrawLine(&local_34,&local_40,cVar4);
NavDrawLine(&local_40,&local_58,cVar4);
if (this == *(TerrorNavArea **)(TheNavMesh + 0x474)) {
local_58 = local_58 + 2.0;
local_54 = local_54 + 2.0;
local_4c = local_4c - 2.0;
local_48 = local_48 + 2.0;
local_40 = local_40 + 2.0;
local_3c = local_3c - 2.0;
local_34 = local_34 - 2.0;
local_30 = local_30 - 2.0;
NavDrawLine(&local_58,&local_4c,5);
NavDrawLine(&local_4c,&local_34,5);
NavDrawLine(&local_34,&local_40,5);
NavDrawLine(&local_40,&local_58,5);
}
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.