CNavMesh::DrawDanger
0x0073e300 · 400 bytes · __cdecl
_ZNK8CNavMesh10DrawDangerEv
Decompiled
undefined (0 params)
/* CNavMesh::DrawDanger() const */
void CNavMesh::DrawDanger(void)
{
CNavArea *this;
int iVar1;
longdouble lVar2;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
iVar1 = 0;
if (0 < DAT_00fe6000) {
do {
while( true ) {
this = *(CNavArea **)(TheNavAreas + iVar1 * 4);
local_34 = *(float *)(this + 0x2c);
local_30 = *(float *)(this + 0x30);
local_2c = *(float *)(this + 0x34);
lVar2 = (longdouble)CNavArea::GetZ(this,local_34,local_30);
local_2c = (float)lVar2;
lVar2 = (longdouble)CNavArea::GetDanger(this,0);
if (0.1 < (float)lVar2) {
local_28 = local_34;
local_20 = (float)lVar2 * 10.0 + local_2c;
local_24 = local_30;
NDebugOverlay::Line((Vector *)&local_34,(Vector *)&local_28,0xff,0,0,true,0.1);
}
lVar2 = (longdouble)CNavArea::GetDanger(this,1);
if (0.1 < (float)lVar2) break;
iVar1 = iVar1 + 1;
if (DAT_00fe6000 <= iVar1) {
return;
}
}
iVar1 = iVar1 + 1;
local_28 = local_34;
local_20 = (float)lVar2 * 10.0 + local_2c;
local_24 = local_30;
NDebugOverlay::Line((Vector *)&local_34,(Vector *)&local_28,0,0,0xff,true,0.1);
} while (iVar1 < 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.