TerrorNavArea::IsCompletelyVisible
0x00976020 · 304 bytes · __thiscall
_ZNK13TerrorNavArea19IsCompletelyVisibleEPKS_
Decompiled
undefined (2 params)
/* TerrorNavArea::IsCompletelyVisible(TerrorNavArea const*) const */
ushort __thiscall TerrorNavArea::IsCompletelyVisible(TerrorNavArea *this,TerrorNavArea *param_1)
{
int iVar1;
ushort *puVar2;
short local_e;
if (param_1 != (TerrorNavArea *)0x0) {
if (param_1 == this) {
return 1;
}
if ((((byte)param_1[0x12d] & 0x10) == 0) ||
((*(float *)(param_1 + 0x34) - *(float *)(this + 0x34)) *
(*(float *)(param_1 + 0x34) - *(float *)(this + 0x34)) +
(*(float *)(param_1 + 0x2c) - *(float *)(this + 0x2c)) *
(*(float *)(param_1 + 0x2c) - *(float *)(this + 0x2c)) +
(*(float *)(param_1 + 0x30) - *(float *)(this + 0x30)) *
(*(float *)(param_1 + 0x30) - *(float *)(this + 0x30)) <
*(float *)(NavObscureRange._28_4_ + 0x2c) * *(float *)(NavObscureRange._28_4_ + 0x2c))) {
if (((uint)param_1 & 3) != 0) {
Error("Bad nav area pointer");
}
local_e = *(short *)(param_1 + 0x90) << 2;
if (((*(size_t *)(this + 0x13c) != 0) &&
(puVar2 = bsearch(&local_e,*(void **)(this + 0x134),*(size_t *)(this + 0x13c),2,
AreaSortFunc), puVar2 != (ushort *)0x0)) ||
((iVar1 = *(int *)(this + 0x130), iVar1 != 0 &&
((*(size_t *)(iVar1 + 0x13c) != 0 &&
(puVar2 = bsearch(&local_e,*(void **)(iVar1 + 0x134),*(size_t *)(iVar1 + 0x13c),2,
AreaSortFunc), puVar2 != (ushort *)0x0)))))) {
return *puVar2 >> 1 & 1;
}
}
}
return 0;
}
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.