CNavArea::DrawAreaConnection
0x006fe820 · 595 bytes · __thiscall
_ZNK8CNavArea18DrawAreaConnectionEPS_10NavDirTypeii
Decompiled
undefined (5 params)
/* CNavArea::DrawAreaConnection(CNavArea*, NavDirType, int, int) const */
void __thiscall
CNavArea::DrawAreaConnection(CNavArea *this,CNavArea *param_1,uint param_3,int param_4,int param_5)
{
float fVar1;
float fVar2;
char cVar3;
undefined4 uVar4;
longdouble lVar5;
undefined1 local_50 [4];
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
undefined4 local_2c;
Vector local_28 [24];
ComputePortal(this,param_1,param_3,&local_34,local_50);
if (param_3 == 1) {
local_4c = local_34 - 5.0;
local_40 = local_34 + 5.0;
local_48 = local_30;
local_44 = (float)local_2c;
local_38 = (float)local_2c;
local_3c = local_30;
}
else if ((int)param_3 < 2) {
if (param_3 == 0) {
local_48 = local_30 + 5.0;
local_3c = local_30 - 5.0;
local_4c = local_34;
local_44 = (float)local_2c;
local_38 = (float)local_2c;
local_40 = local_34;
}
}
else if (param_3 == 2) {
local_48 = local_30 - 5.0;
local_44 = (float)local_2c;
local_3c = local_30 + 5.0;
local_4c = local_34;
local_40 = local_34;
local_38 = local_44;
}
else if (param_3 == 3) {
local_4c = local_34 + 5.0;
local_40 = local_34 - 5.0;
local_48 = local_30;
local_44 = (float)local_2c;
local_38 = (float)local_2c;
local_3c = local_30;
}
fVar2 = local_3c;
fVar1 = local_40;
lVar5 = (longdouble)GetZ(this,local_4c,local_48);
local_44 = (float)lVar5;
lVar5 = (longdouble)GetZ(param_1,fVar1,fVar2);
local_38 = (float)lVar5;
GetClosestPointOnArea(param_1,(Vector *)&local_40,local_28);
uVar4 = 0;
if (param_3 < 4) {
uVar4 = (&CSWTCH_1821)[param_3];
}
cVar3 = IsConnected(param_1,this,uVar4);
if (cVar3 != '\0') {
param_4 = param_5;
}
if (-1 < param_4) {
NavDrawLine(&local_4c,local_28,param_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.