CFuncNavBlocker::UpdateBlocked
0x007184e0 · 968 bytes · __thiscall
_ZN15CFuncNavBlocker13UpdateBlockedEv
Decompiled
undefined (1 param)
/* CFuncNavBlocker::UpdateBlocked() */
void __thiscall CFuncNavBlocker::UpdateBlocked(CFuncNavBlocker *this)
{
int *piVar1;
CNavArea *this_00;
int iVar2;
int iVar3;
int iVar4;
float fVar5;
int local_88;
int local_84;
int local_80;
int local_7c;
CUtlMemory<CNavArea*,int> *local_78;
int local_74;
CNavArea *local_68;
char local_64;
int *local_60;
undefined4 local_5c;
undefined4 local_58;
int local_54;
int *local_50;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
local_60 = (int *)0x0;
local_5c = 0;
local_58 = 0;
local_54 = 0;
local_50 = (int *)0x0;
local_64 = '\x01';
/* try { // try from 00718539 to 007187e9 has its CatchHandler @ 007188ee */
(**(code **)(*(int *)(this + 0x194) + 0x3c))(this + 0x194,&local_4c,&local_40);
iVar4 = TheNavMesh;
if (*(int *)(TheNavMesh + 0x18) != 0) {
if ((CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
searchMarker == '\0') &&
(iVar2 = __cxa_guard_acquire(&CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
::searchMarker), iVar2 != 0)) {
/* try { // try from 00718836 to 0071883a has its CatchHandler @ 007188b2 */
CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
searchMarker = RandomInt(0,0x100000);
__cxa_guard_release(&CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
::searchMarker);
}
iVar2 = CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
searchMarker + 1;
if (CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
searchMarker + 1 == 0) {
iVar2 = CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
searchMarker + 2;
}
CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
searchMarker = iVar2;
fVar5 = 1.0 / *(float *)(iVar4 + 0x20);
iVar2 = (int)((local_4c - *(float *)(iVar4 + 0x2c)) * fVar5);
if (iVar2 < 0) {
local_7c = 0;
}
else {
local_7c = *(int *)(iVar4 + 0x24) + -1;
if (iVar2 < *(int *)(iVar4 + 0x24)) {
local_7c = iVar2;
}
}
iVar2 = (int)((local_40 - *(float *)(iVar4 + 0x2c)) * fVar5);
if (iVar2 < 0) {
local_84 = 0;
}
else {
local_84 = *(int *)(iVar4 + 0x24) + -1;
if (iVar2 < *(int *)(iVar4 + 0x24)) {
local_84 = iVar2;
}
}
iVar2 = (int)((local_48 - *(float *)(iVar4 + 0x30)) * fVar5);
if (iVar2 < 0) {
local_88 = 0;
}
else {
local_88 = *(int *)(iVar4 + 0x28) + -1;
if (iVar2 < *(int *)(iVar4 + 0x28)) {
local_88 = iVar2;
}
}
iVar2 = (int)((local_3c - *(float *)(iVar4 + 0x30)) * fVar5);
if (iVar2 < 0) {
local_80 = 0;
}
else {
local_80 = *(int *)(iVar4 + 0x28) + -1;
if (iVar2 < *(int *)(iVar4 + 0x28)) {
local_80 = iVar2;
}
}
for (; local_7c <= local_84; local_7c = local_7c + 1) {
if (local_88 <= local_80) {
iVar2 = local_88 * *(int *)(iVar4 + 0x24) + local_7c;
if (iVar2 < *(int *)(iVar4 + 0x18)) {
local_74 = local_88;
do {
iVar3 = 0;
piVar1 = (int *)(*(int *)(iVar4 + 0xc) + iVar2 * 0x14);
if (0 < piVar1[3]) {
do {
this_00 = *(CNavArea **)(*piVar1 + iVar3 * 4);
if (*(int *)(this_00 + 0x74) !=
CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
::searchMarker) {
*(int *)(this_00 + 0x74) =
CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
::searchMarker;
CNavArea::GetExtent(this_00,(Extent *)&local_34);
if (((((local_4c <= local_28) && (local_34 <= local_40)) && (local_48 <= local_24)
) && ((local_30 <= local_3c && (local_44 <= local_20)))) &&
(local_2c <= local_38)) {
local_68 = this_00;
if ((local_64 == '\0') || (local_54 < 1)) {
LAB_007187d4:
CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::InsertBefore
((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)&local_60,
local_54,&local_68);
}
else if (this_00 != (CNavArea *)*local_60) {
iVar2 = 0;
do {
iVar2 = iVar2 + 1;
if (iVar2 == local_54) goto LAB_007187d4;
} while (this_00 != (CNavArea *)local_60[iVar2]);
if (iVar2 < 0) goto LAB_007187d4;
}
}
}
iVar3 = iVar3 + 1;
} while (iVar3 < piVar1[3]);
}
local_74 = local_74 + 1;
if (local_80 < local_74) goto LAB_00718884;
iVar2 = local_74 * *(int *)(iVar4 + 0x24) + local_7c;
if (*(int *)(iVar4 + 0x18) <= iVar2) break;
} while( true );
}
if (CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
__executeCount < 10) {
CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
::__executeCount =
CNavMesh::
ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
__executeCount + 1;
/* try { // try from 007188a8 to 007188ac has its CatchHandler @ 007188ee */
Warning("** Walked off of the CNavMesh::m_grid in ForAllAreasOverlappingExtent()\n");
}
break;
}
LAB_00718884:
}
}
local_78 = (CUtlMemory<CNavArea*,int> *)&local_60;
iVar4 = 0;
if (0 < local_54) {
do {
(**(code **)(*(int *)local_60[iVar4] + 0x48))((int *)local_60[iVar4],1,0xffffffff);
iVar4 = iVar4 + 1;
} while (iVar4 < local_54);
}
local_54 = 0;
CUtlMemory<CNavArea*,int>::Purge(local_78);
local_50 = local_60;
CUtlMemory<CNavArea*,int>::Purge(local_78);
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.