CEscapeRoute::AddArea
0x008ce3c0 · 266 bytes · __thiscall
_ZN12CEscapeRoute7AddAreaEP13TerrorNavArea
Decompiled
undefined (2 params)
/* CEscapeRoute::AddArea(TerrorNavArea*) */
void __thiscall CEscapeRoute::AddArea(CEscapeRoute *this,TerrorNavArea *param_1)
{
CEscapeRoute *pCVar1;
float local_28;
float local_24;
float local_20;
if (0x1ff < *(int *)(this + 0x1c40)) {
Warning("Survivor main path is too long to transmit");
return;
}
*(TerrorNavArea **)(this + *(int *)(this + 0x1c40) * 4 + 0x1c48) = param_1;
TerrorNavArea::SetSpawnAttributes(param_1,0x20000);
if (*(CNavArea **)(this + 0x3448) != (CNavArea *)0x0) {
CNavArea::GetClosestPointOnArea
(*(CNavArea **)(this + 0x3448),(Vector *)(param_1 + 0x2c),(Vector *)&local_28);
pCVar1 = this + (*(int *)(this + 0x1c40) * 3 + -3) * 4 + 0x440;
*(float *)(this + 0x1c44) =
SQRT((local_28 - *(float *)pCVar1) * (local_28 - *(float *)pCVar1) +
(local_20 - *(float *)(pCVar1 + 8)) * (local_20 - *(float *)(pCVar1 + 8)) +
(local_24 - *(float *)(pCVar1 + 4)) * (local_24 - *(float *)(pCVar1 + 4))) +
*(float *)(this + 0x1c44);
AddNode(this,(Vector *)&local_28,param_1);
*(TerrorNavArea **)(this + 0x3448) = param_1;
return;
}
AddNode(this,(Vector *)(param_1 + 0x2c),param_1);
*(TerrorNavArea **)(this + 0x3448) = param_1;
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.