CFuncNavAttributeRegion::InputApplyNavAttributes
0x00971fb0 · 899 bytes · __cdecl
_ZN23CFuncNavAttributeRegion23InputApplyNavAttributesER11inputdata_t
Decompiled
undefined (1 param)
/* CFuncNavAttributeRegion::InputApplyNavAttributes(inputdata_t&) */
void CFuncNavAttributeRegion::InputApplyNavAttributes(inputdata_t *param_1)
{
CCollisionProperty *this;
CNavArea *this_00;
int iVar1;
float local_fc;
float local_f8;
float local_f4;
float local_f0;
float local_ec;
float local_e8;
float local_e4;
float local_e0;
float local_dc;
float local_d8;
float local_d4;
float local_d0;
float local_cc;
float local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
float local_ac;
float local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
undefined1 local_70 [55];
char local_39;
iVar1 = 0;
this = (CCollisionProperty *)(param_1 + 0x194);
(**(code **)(*(int *)(param_1 + 0x194) + 0x3c))(this,&local_fc,&local_f0);
CCollisionProperty::SetSolidFlags(this,*(ushort *)(param_1 + 0x1b4) & 0xfffffffb);
if (0 < DAT_00fe6000) {
LAB_00972018:
do {
while( true ) {
this_00 = *(CNavArea **)(TheNavAreas + iVar1 * 4);
CNavArea::GetExtent(this_00,(Extent *)&local_e4);
local_d0 = local_d0 + 1.0;
if ((((local_fc <= local_d8) && (local_e4 <= local_f0)) && (local_f8 <= local_d4)) &&
(((local_e0 <= local_ec && (local_f4 <= local_d0)) && (local_dc <= local_e8)))) break;
LAB_009720b0:
iVar1 = iVar1 + 1;
if (DAT_00fe6000 <= iVar1) goto LAB_009720bf;
}
local_87 = 0;
local_bc = 0;
local_9c = (local_d8 - local_e4) * 0.5;
local_b8 = 0;
local_98 = (local_d4 - local_e0) * 0.5;
local_b4 = 0;
local_94 = (local_d0 - local_dc) * 0.5;
local_8c = 0;
local_a8 = (local_d4 + local_e0) * 0.5;
local_ac = (local_d8 + local_e4) * 0.5;
local_a4 = (local_d0 + local_dc) * 0.5;
local_c8 = DAT_01053d4c + local_a8;
local_a8 = -local_a8;
local_cc = vec3_origin + local_ac;
local_ac = -local_ac;
local_c4 = DAT_01053d50 + local_a4;
local_a4 = -local_a4;
local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
(**(code **)(*enginetrace + 0xc))(enginetrace,&local_cc,0xffffffff,param_1,local_70);
if (local_39 == '\0') goto LAB_009720b0;
if (param_1[0x445] == (inputdata_t)0x0) {
*(uint *)(this_00 + 300) = *(uint *)(this_00 + 300) | *(uint *)(param_1 + 0x148);
if (param_1[0x440] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) | 4;
}
if (param_1[0x441] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) | 1;
}
if (param_1[0x442] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) | 0x1000;
}
if (param_1[0x443] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) | 0x10000;
}
if (param_1[0x444] == (inputdata_t)0x0) goto LAB_009720b0;
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) | 0x20000;
iVar1 = iVar1 + 1;
if (DAT_00fe6000 <= iVar1) break;
goto LAB_00972018;
}
*(uint *)(this_00 + 300) = *(uint *)(this_00 + 300) & ~*(uint *)(param_1 + 0x148);
if (param_1[0x440] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) & 0xfffffffb;
}
if (param_1[0x441] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) & 0xfffffffe;
}
if (param_1[0x442] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) & 0xffffefff;
}
if (param_1[0x443] != (inputdata_t)0x0) {
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) & 0xfffeffff;
}
if (param_1[0x444] == (inputdata_t)0x0) goto LAB_009720b0;
*(uint *)(this_00 + 0x54) = *(uint *)(this_00 + 0x54) & 0xfffdffff;
iVar1 = iVar1 + 1;
} while (iVar1 < DAT_00fe6000);
}
LAB_009720bf:
CCollisionProperty::SetSolidFlags(this,(uint)(*(ushort *)(param_1 + 0x1b4) | 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.