CNavMesh::DrawEditMode
0x00711ef0 · 6497 bytes · __thiscall
_ZN8CNavMesh12DrawEditModeEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNavMesh::DrawEditMode() */
void __thiscall CNavMesh::DrawEditMode(CNavMesh *this)
{
uint uVar1;
char cVar2;
int iVar3;
CBaseEntity *this_00;
int iVar4;
CNavLadder *this_01;
char *pcVar5;
CNavArea *pCVar6;
int *piVar7;
undefined4 uVar8;
int iVar9;
int iVar10;
uint *puVar11;
undefined *puVar12;
CNavNode *this_02;
int iVar13;
int in_GS_OFFSET;
longdouble lVar14;
float fVar15;
float local_188;
CNavArea *local_180;
undefined4 local_17c;
undefined4 local_178;
undefined4 local_170;
undefined4 local_16c;
int local_168;
CNavArea *local_164;
float local_160;
float local_15c;
float local_158;
float local_154;
float local_150;
float local_14c;
float local_148;
float local_144;
Vector local_140 [12];
CNavArea *local_134;
float local_130;
float local_12c;
CNavArea *local_128;
float local_124;
float local_120;
float local_11c;
float local_118;
char local_110 [80];
char local_c0 [80];
uint local_70;
undefined2 local_6c;
int local_20;
local_17c = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_178 = 0;
if (___atan2f_finite == 0) {
local_168 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_17c,0,0,0,0,"/data/src/game/server/nav_edit.cpp",0x2e4,
&DrawEditMode()::tm_fmt,"(%s)%s","Unaccounted","CNavMesh::DrawEditMode");
local_168 = ___atan2f_finite;
}
iVar4 = _DAT_0105db00;
local_170 = local_17c;
local_16c = local_178;
/* try { // try from 00711fc7 to 00711fcb has its CatchHandler @ 0071309f */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
if ((char *)*_DAT_0105d15c != "CNavMesh::DrawEditMode") {
/* try { // try from 00712e98 to 00712ea9 has its CatchHandler @ 0071309f */
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xca1fc4,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00711fd4 to 00711fd8 has its CatchHandler @ 00713490 */
this_00 = (CBaseEntity *)UTIL_GetListenServerHost();
iVar4 = _DAT_0105db00;
if ((this_00 == (CBaseEntity *)0x0) || (*(int *)(this + 0x528) != 0)) {
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_168 != 0) {
(**(code **)(local_168 + 0x54))(local_168,local_170,local_16c,0,0,0);
}
goto LAB_00712767;
}
if ((DrawEditMode()::host_thread_mode == '\0') &&
(iVar4 = __cxa_guard_acquire(&DrawEditMode()::host_thread_mode), iVar4 != 0)) {
/* try { // try from 0071201d to 00712021 has its CatchHandler @ 00713273 */
ConVarRef::ConVarRef((ConVarRef *)&DrawEditMode()::host_thread_mode,"host_thread_mode");
__cxa_guard_release(&DrawEditMode()::host_thread_mode);
}
/* try { // try from 00712040 to 00712042 has its CatchHandler @ 00713490 */
(**(code **)(*DrawEditMode()::host_thread_mode + 8))(DrawEditMode()::host_thread_mode,0);
if ((DrawEditMode()::sb_perf_collect == '\0') &&
(iVar4 = __cxa_guard_acquire(&DrawEditMode()::sb_perf_collect), iVar4 != 0)) {
/* try { // try from 0071206b to 0071206f has its CatchHandler @ 0071338e */
ConVarRef::ConVarRef((ConVarRef *)&DrawEditMode()::sb_perf_collect,"sb_perf_collect");
__cxa_guard_release(&DrawEditMode()::sb_perf_collect);
}
/* try { // try from 0071208e to 00712634 has its CatchHandler @ 00713490 */
(**(code **)(*DrawEditMode()::sb_perf_collect + 8))(DrawEditMode()::sb_perf_collect,0);
this_02 = CNavNode::m_list;
if (*(int *)(nav_show_nodes._28_4_ + 0x30) != 0) {
for (; this_02 != (CNavNode *)0x0; this_02 = *(CNavNode **)(this_02 + 0x60)) {
while ((*(float *)(this + 0x464) - *(float *)this_02) *
(*(float *)(this + 0x464) - *(float *)this_02) +
(*(float *)(this + 0x468) - *(float *)(this_02 + 4)) *
(*(float *)(this + 0x468) - *(float *)(this_02 + 4)) +
(*(float *)(this + 0x46c) - *(float *)(this_02 + 8)) *
(*(float *)(this + 0x46c) - *(float *)(this_02 + 8)) < 22500.0) {
CNavNode::Draw(this_02);
this_02 = *(CNavNode **)(this_02 + 0x60);
if (this_02 == (CNavNode *)0x0) goto LAB_0071210d;
}
}
}
LAB_0071210d:
GetEditVectors((Vector *)&local_164,(Vector *)&local_158);
local_148 = local_154 * 1000.0 + local_160;
local_144 = local_150 * 1000.0 + local_15c;
local_14c = local_158 * 1000.0 + (float)local_164;
cVar2 = FindActiveNavArea(this);
if ((((cVar2 != '\0') || (*(int *)(this + 0x470) != 0)) || (*(int *)(this + 0x4c4) != 0)) ||
((*(int *)(this + 0x4e0) != 0 || (*(int *)(this + 0x458) - 2U < 2)))) {
if (this[0x494] == (CNavMesh)0x0) {
local_128 = *(CNavArea **)(this + 0x464);
local_124 = *(float *)(this + 0x468);
local_120 = *(float *)(this + 0x46c) + 10.0;
NavDrawLine((Vector *)&local_128,this + 0x464,0x12);
local_130 = *(float *)(this + 0x468);
local_134 = (CNavArea *)(*(float *)(this + 0x464) + 10.0);
local_128 = (CNavArea *)(*(float *)(this + 0x464) - 10.0);
local_12c = *(float *)(this + 0x46c);
local_124 = local_130;
local_120 = local_12c;
NavDrawLine(&local_134,(Vector *)&local_128,0x12);
local_134 = *(CNavArea **)(this + 0x464);
local_124 = *(float *)(this + 0x468) - 10.0;
local_130 = *(float *)(this + 0x468) + 10.0;
local_12c = *(float *)(this + 0x46c);
local_128 = local_134;
local_120 = local_12c;
NavDrawLine(&local_134,(Vector *)&local_128,0x12);
if (*(int *)(nav_show_compass._28_4_ + 0x30) != 0) {
local_128 = *(CNavArea **)(this + 0x464);
local_120 = *(float *)(this + 0x46c);
local_124 = *(float *)(this + 0x468) - 15.0;
/* try { // try from 0071310a to 0071326d has its CatchHandler @ 00713490 */
NDebugOverlay::Text((Vector *)&local_128,"N",false,0.01023);
local_128 = *(CNavArea **)(this + 0x464);
local_120 = *(float *)(this + 0x46c);
local_124 = *(float *)(this + 0x468) + 15.0;
NDebugOverlay::Text((Vector *)&local_128,"S",false,0.01023);
local_124 = *(float *)(this + 0x468);
local_128 = (CNavArea *)(*(float *)(this + 0x464) + 15.0);
local_120 = *(float *)(this + 0x46c);
NDebugOverlay::Text((Vector *)&local_128,"E",false,0.01023);
local_124 = *(float *)(this + 0x468);
local_128 = (CNavArea *)(*(float *)(this + 0x464) - 15.0);
local_120 = *(float *)(this + 0x46c);
NDebugOverlay::Text((Vector *)&local_128,"W",false,0.01023);
}
iVar4 = *(int *)(this + 0x458);
if (iVar4 != 2) goto LAB_007122f2;
LAB_007127cf:
local_128 = *(CNavArea **)(this + 0x480);
fVar15 = *(float *)(this + 0x488) + 2.0;
local_130 = *(float *)(this + 0x468);
local_134 = *(CNavArea **)(this + 0x464);
local_12c = fVar15;
local_124 = local_130;
local_120 = fVar15;
NavDrawLine(&local_134,&local_128,0x14);
local_124 = *(float *)(this + 0x468);
local_134 = *(CNavArea **)(this + 0x480);
local_130 = *(float *)(this + 0x484);
local_12c = fVar15;
local_128 = local_134;
local_120 = fVar15;
NavDrawLine(&local_134,&local_128,0x14);
local_128 = *(CNavArea **)(this + 0x464);
local_130 = *(float *)(this + 0x484);
local_134 = *(CNavArea **)(this + 0x480);
local_12c = fVar15;
local_124 = local_130;
local_120 = fVar15;
NavDrawLine(&local_134,&local_128,0x14);
local_124 = *(float *)(this + 0x484);
local_134 = *(CNavArea **)(this + 0x464);
local_130 = *(float *)(this + 0x468);
local_12c = fVar15;
local_128 = local_134;
local_120 = fVar15;
NavDrawLine(&local_134,&local_128,0x14);
}
else {
/* try { // try from 007127bb to 0071297a has its CatchHandler @ 00713490 */
NDebugOverlay::Cross3D((Vector *)(this + 0x464),10.0,0,0xff,0,true,0.01023);
iVar4 = *(int *)(this + 0x458);
if (iVar4 == 2) goto LAB_007127cf;
LAB_007122f2:
if (iVar4 == 4) {
fVar15 = *(float *)(this + 0x488);
local_134 = *(CNavArea **)(this + 0x480);
local_12c = (float)*(int *)(this + 0x500) + fVar15;
local_120 = fVar15 - (float)*(int *)(this + 0x504);
local_130 = *(float *)(this + 0x484);
local_124 = *(float *)(this + 0x468);
local_128 = *(CNavArea **)(this + 0x464);
NavDrawVolume(&local_134,&local_128,(int)fVar15,0x17);
UpdateDragSelectionSet(this);
puVar11 = &s_dragSelectionSetDeleteColor;
if (this[0x4fe] == (CNavMesh)0x0) {
puVar11 = &s_dragSelectionSetAddColor;
}
iVar4 = 0;
local_70 = *puVar11;
if (0 < *(int *)(this + 0x4f4)) {
do {
CNavArea::DrawDragSelectionSet
(*(CNavArea **)(*(int *)(this + 0x4e8) + iVar4 * 4),(Color *)&local_70);
iVar4 = iVar4 + 1;
} while (iVar4 < *(int *)(this + 0x4f4));
}
}
else if (iVar4 == 3) {
cVar2 = FindLadderCorners(this,local_140,(Vector *)&local_134,(Vector *)&local_128);
if (cVar2 != '\0') {
iVar4 = ~-(uint)(this[0x494] == (CNavMesh)0x0) + 0x15;
NavDrawLine(this + 0x4a4,local_140,iVar4);
NavDrawLine(local_140,(Vector *)&local_128,iVar4);
NavDrawLine((Vector *)&local_128,(Vector *)&local_134,iVar4);
NavDrawLine((Vector *)&local_134,this + 0x4a4,iVar4);
}
}
}
this_01 = *(CNavLadder **)(this + 0x4bc);
if (this_01 != (CNavLadder *)0x0) {
*(undefined4 *)(this + 0x478) = 0;
if ((this_01 != *(CNavLadder **)(this + 0x4c0)) ||
(*(int *)(nav_show_area_info._28_4_ + 0x30) != 0)) {
*(CNavLadder **)(this + 0x4c0) = this_01;
uVar1 = *(uint *)(this_01 + 0x38);
if ((uVar1 == 0xffffffff) ||
(((puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc
|| (*(uint *)(puVar12 + 8) != uVar1 >> 0xc)) ||
(*(CBaseEntity **)(puVar12 + 4) == (CBaseEntity *)0x0)))) {
V_snprintf((char *)&local_70,0x50,"Ladder #%d\n",*(undefined4 *)(this_01 + 0x4c));
}
else {
iVar4 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(puVar12 + 4));
piVar7 = (int *)GetGlobalTeam(iVar4);
uVar8 = (**(code **)(*piVar7 + 0x32c))(piVar7);
V_snprintf((char *)&local_70,0x50,"Ladder #%d (Team %s)\n",
*(undefined4 *)(*(int *)(this + 0x4bc) + 0x4c),uVar8);
}
fVar15 = 0.1;
if (*(int *)(nav_show_area_info._28_4_ + 0x30) == 0) {
fVar15 = 0.5;
}
NDebugOverlay::ScreenText(0.5,0.53,(char *)&local_70,0xff,0xff,0,0x80,fVar15);
this_01 = *(CNavLadder **)(this + 0x4bc);
}
CNavLadder::DrawLadder(this_01);
CNavLadder::DrawConnectedAreas(*(CNavLadder **)(this + 0x4bc));
}
if ((*(CNavLadder **)(this + 0x4c4) != (CNavLadder *)0x0) && (*(int *)(this + 0x458) != 1)) {
CNavLadder::DrawLadder(*(CNavLadder **)(this + 0x4c4));
}
piVar7 = *(int **)(this + 0x470);
if ((piVar7 != (int *)0x0) && (*(int *)(this + 0x458) != 1)) {
(**(code **)(*piVar7 + 0x50))(piVar7);
}
pCVar6 = *(CNavArea **)(this + 0x474);
if (pCVar6 != (CNavArea *)0x0) {
*(undefined4 *)(this + 0x4c0) = 0;
fVar15 = *(float *)(nav_show_area_info._28_4_ + 0x2c);
if (pCVar6 != *(CNavArea **)(this + 0x478)) {
lVar14 = (longdouble)CountdownTimer::Now();
if ((float)lVar14 + fVar15 != *(float *)(this + 0x4d0)) {
(**(code **)(*(int *)(this + 0x4c8) + 4))(this + 0x4c8,this + 0x4d0);
*(float *)(this + 0x4d0) = (float)lVar14 + fVar15;
}
if (fVar15 != *(float *)(this + 0x4cc)) {
/* try { // try from 00713457 to 007138ba has its CatchHandler @ 00713490 */
(**(code **)(*(int *)(this + 0x4c8) + 4))(this + 0x4c8,this + 0x4cc);
*(float *)(this + 0x4cc) = fVar15;
}
pCVar6 = *(CNavArea **)(this + 0x474);
*(CNavArea **)(this + 0x478) = pCVar6;
}
if (0.0 < *(float *)(this + 0x4d0)) {
lVar14 = (longdouble)CountdownTimer::Now();
pCVar6 = *(CNavArea **)(this + 0x474);
if (*(float *)(this + 0x4d0) <= (float)lVar14) goto LAB_007124c5;
LAB_00712b49:
if (*(uint *)(pCVar6 + 0x94) == 0) {
local_70 = local_70 & 0xffffff00;
}
else {
pcVar5 = (char *)PlaceToName(TheNavMesh,*(uint *)(pCVar6 + 0x94));
if (pcVar5 == (char *)0x0) {
local_70 = 0x4f525245;
pCVar6 = *(CNavArea **)(this + 0x474);
local_6c = 0x52;
}
else {
strcpy((char *)&local_70,pcVar5);
pCVar6 = *(CNavArea **)(this + 0x474);
}
}
local_c0[0] = '\0';
if (*(int *)(this + 0x458) != 1) {
uVar1 = *(uint *)(pCVar6 + 0x54);
if ((uVar1 & 1) != 0) {
V_strncat(local_c0,"CROUCH ",0x50,-1);
}
if ((uVar1 & 2) != 0) {
V_strncat(local_c0,"JUMP ",0x50,-1);
}
if ((uVar1 & 4) != 0) {
V_strncat(local_c0,"PRECISE ",0x50,-1);
}
if ((uVar1 & 8) != 0) {
V_strncat(local_c0,"NO_JUMP ",0x50,-1);
}
if ((uVar1 & 0x10) != 0) {
V_strncat(local_c0,"STOP ",0x50,-1);
}
if ((uVar1 & 0x20) != 0) {
V_strncat(local_c0,"RUN ",0x50,-1);
}
if ((uVar1 & 0x40) != 0) {
V_strncat(local_c0,"WALK ",0x50,-1);
}
if ((uVar1 & 0x80) != 0) {
V_strncat(local_c0,"AVOID ",0x50,-1);
}
if ((uVar1 & 0x100) != 0) {
V_strncat(local_c0,"TRANSIENT ",0x50,-1);
}
if ((uVar1 & 0x200) != 0) {
V_strncat(local_c0,"DONT_HIDE ",0x50,-1);
}
if ((uVar1 & 0x400) != 0) {
V_strncat(local_c0,"STAND ",0x50,-1);
}
if ((uVar1 & 0x800) != 0) {
V_strncat(local_c0,"NO HOSTAGES ",0x50,-1);
}
if ((uVar1 & 0x1000) != 0) {
V_strncat(local_c0,"STAIRS ",0x50,-1);
}
if ((uVar1 & 0x4000) != 0) {
V_strncat(local_c0,"OBSTACLE ",0x50,-1);
}
if ((uVar1 & 0x8000) != 0) {
/* try { // try from 00712ee7 to 00713099 has its CatchHandler @ 00713490 */
V_strncat(local_c0,"CLIFF ",0x50,-1);
}
if ((uVar1 & 0x40000) != 0) {
V_strncat(local_c0,"PLAYERCLIP ",0x50,-1);
}
if ((uVar1 & 0x80000) != 0) {
V_strncat(local_c0,"BREAKABLEWALL ",0x50,-1);
}
cVar2 = CNavArea::IsBlocked(*(CNavArea **)(this + 0x474),2,false);
if (cVar2 != '\0') {
V_strncat(local_c0,"BLOCKED_SURVIVOR ",0x50,-1);
}
cVar2 = CNavArea::IsBlocked(*(CNavArea **)(this + 0x474),3,false);
if (cVar2 != '\0') {
V_strncat(local_c0,"BLOCKED_ZOMBIE ",0x50,-1);
}
iVar4 = *(int *)(this + 0x474);
if ((*(byte *)(iVar4 + 0x3a) != 0) && (18.0 < (float)*(byte *)(iVar4 + 0x3a) + 0.0)) {
V_strncat(local_c0,"OBSTRUCTED ",0x50,-1);
iVar4 = *(int *)(this + 0x474);
}
if (*(int *)(gpGlobals + 0x18) <= *(int *)(iVar4 + 0x70)) {
V_strncat(local_c0,"DAMAGING ",0x50,-1);
iVar4 = *(int *)(this + 0x474);
}
if (*(char *)(iVar4 + 0xa4) != '\0') {
V_strncat(local_c0,"UNDERWATER ",0x50,-1);
iVar4 = *(int *)(this + 0x474);
}
pcVar5 = (char *)UTIL_VarArgs("%d Connections ",
**(int **)(iVar4 + 0x58) + **(int **)(iVar4 + 0x60) +
**(int **)(iVar4 + 0x5c) + **(int **)(iVar4 + 100));
V_strncat(local_c0,pcVar5,0x50,-1);
pCVar6 = *(CNavArea **)(this + 0x474);
}
V_snprintf(local_110,0x50,"Area #%d %s %s\n",*(undefined4 *)(pCVar6 + 0x8c),&local_70,
local_c0);
NDebugOverlay::ScreenText(0.5,0.53,local_110,0xff,0xff,0,0x80,0.01023);
pCVar6 = *(CNavArea **)(this + 0x474);
if ((this[0x48c] == (CNavMesh)0x0) ||
(*(int *)(pCVar6 + 0x94) == *(int *)(TheNavMesh + 0x460))) goto LAB_007124d5;
*(int *)(pCVar6 + 0x94) = *(int *)(TheNavMesh + 0x460);
CBaseEntity::EmitSound(this_00,"Bot.EditSwitchOn",0.0,(float *)0x0);
pCVar6 = *(CNavArea **)(this + 0x474);
if (this[0x4fc] != (CNavMesh)0x0) goto LAB_00712e4d;
LAB_007124e2:
if (this[0x4fd] != (CNavMesh)0x0) {
local_134 = pCVar6;
CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::FindAndRemove
((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)(this + 0x4d4),&local_134);
goto LAB_00712e59;
}
}
else {
LAB_007124c5:
if (fVar15 < 0.0) goto LAB_00712b49;
LAB_007124d5:
if (this[0x4fc] == (CNavMesh)0x0) goto LAB_007124e2;
LAB_00712e4d:
AddToSelectedSet(this,pCVar6);
LAB_00712e59:
pCVar6 = *(CNavArea **)(this + 0x474);
}
if (*(int *)(this + 0x458) != 1) {
CNavArea::GetExtent(pCVar6,(Extent *)&local_128);
iVar4 = (**(code **)(*(int *)this_00 + 0x238))(this_00);
for (fVar15 = *(float *)(iVar4 + 4); 360.0 < fVar15; fVar15 = fVar15 - 360.0) {
}
for (; fVar15 < 0.0; fVar15 = fVar15 + 360.0) {
}
if (this[0x48d] == (CNavMesh)0x0) {
local_164 = *(CNavArea **)(this + 0x490);
local_160 = local_124;
lVar14 = (longdouble)
CNavArea::GetZ(*(CNavArea **)(this + 0x474),(float)local_164,local_124);
local_14c = *(float *)(this + 0x490);
}
else {
local_160 = *(float *)(this + 0x490);
local_164 = local_128;
lVar14 = (longdouble)
CNavArea::GetZ(*(CNavArea **)(this + 0x474),(float)local_128,local_160);
local_118 = *(float *)(this + 0x490);
local_14c = local_11c;
}
local_15c = (float)lVar14;
local_148 = local_118;
lVar14 = (longdouble)CNavArea::GetZ(*(CNavArea **)(this + 0x474),local_14c,local_118);
local_144 = (float)lVar14;
NavDrawLine(&local_164,&local_14c,0x13);
pCVar6 = *(CNavArea **)(this + 0x474);
}
CNavArea::DrawConnectedAreas(pCVar6);
}
iVar4 = *(int *)(this + 0x4e0);
if (iVar4 != 0) {
local_120 = 0.0;
local_124 = 0.0;
if (*(int *)(this + 0x458) == 5) {
local_124 = *(float *)(this + 0x464) - *(float *)(this + 0x480);
local_120 = *(float *)(this + 0x468) - *(float *)(this + 0x484);
}
iVar3 = 0;
local_128 = (CNavArea *)0x0;
local_11c = 0.0;
if (iVar4 < *(int *)(nav_draw_limit._28_4_ + 0x30)) {
if (0 < iVar4) {
do {
while( true ) {
piVar7 = *(int **)(*(int *)(this + 0x4d4) + iVar3 * 4);
if (0 < *(int *)(TheNavMesh + 0x4e0)) break;
LAB_007126d0:
iVar3 = iVar3 + 1;
if (*(int *)(this + 0x4e0) <= iVar3) goto LAB_007132cb;
}
if (piVar7 != (int *)**(int **)(TheNavMesh + 0x4d4)) {
iVar4 = 0;
do {
iVar4 = iVar4 + 1;
if (iVar4 == *(int *)(TheNavMesh + 0x4e0)) goto LAB_007126d0;
} while (piVar7 != (int *)(*(int **)(TheNavMesh + 0x4d4))[iVar4]);
}
/* try { // try from 00712a36 to 00712e58 has its CatchHandler @ 00713490 */
(**(code **)(*piVar7 + 0x58))(piVar7,&local_124);
local_128 = local_128 + 1;
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(this + 0x4e0));
}
}
else {
local_180 = (CNavArea *)0x0;
local_188 = 1e+10;
if (0 < iVar4) {
do {
pCVar6 = *(CNavArea **)(*(int *)(this + 0x4d4) + iVar3 * 4);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
fVar15 = (*(float *)(this_00 + 0x2e4) - *(float *)(pCVar6 + 0x30)) *
(*(float *)(this_00 + 0x2e4) - *(float *)(pCVar6 + 0x30)) +
(*(float *)(this_00 + 0x2e8) - *(float *)(pCVar6 + 0x34)) *
(*(float *)(this_00 + 0x2e8) - *(float *)(pCVar6 + 0x34)) +
(*(float *)(this_00 + 0x2e0) - *(float *)(pCVar6 + 0x2c)) *
(*(float *)(this_00 + 0x2e0) - *(float *)(pCVar6 + 0x2c));
if (fVar15 < local_188) {
local_188 = fVar15;
local_180 = pCVar6;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(this + 0x4e0));
}
/* try { // try from 007132c6 to 007133d9 has its CatchHandler @ 00713490 */
SearchSurroundingAreas<DrawSelectedSet>
(local_180,(Vector *)(local_180 + 0x2c),(DrawSelectedSet *)&local_128,-1.0,3,-1);
}
LAB_007132cb:
iVar4 = *(int *)(this + 0x474);
if (((iVar4 != 0) && (0 < *(int *)(this + 0x4e0))) &&
(piVar7 = *(int **)(this + 0x4d4), iVar4 != *piVar7)) {
iVar3 = 0;
do {
iVar3 = iVar3 + 1;
if (iVar3 == *(int *)(this + 0x4e0)) {
local_188 = 0.0;
goto LAB_0071331a;
}
} while (iVar4 != piVar7[iVar3]);
}
}
}
LAB_007129bc:
iVar4 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar3 = ThreadGetCurrentId(), iVar4 == iVar3)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_168 != 0) {
(**(code **)(local_168 + 0x54))(local_168,local_170,local_16c,0,0,0);
}
LAB_00712767:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
LAB_0071331a:
pCVar6 = (CNavArea *)piVar7[(int)local_188];
iVar4 = 0;
do {
piVar7 = *(int **)(pCVar6 + iVar4 * 4 + 0x58);
iVar3 = *piVar7;
if (0 < iVar3) {
iVar13 = 0;
iVar10 = iVar3;
do {
if (iVar10 < 1) {
LAB_0071336b:
iVar10 = 0;
if (*(int *)(this + 0x474) == 0) {
LAB_007133b4:
CNavArea::DrawAreaConnection(pCVar6,iVar10,iVar4,0x21,0xffffffff);
}
}
else {
iVar9 = 0;
if (iVar13 != 0) {
do {
iVar9 = iVar9 + 1;
if (iVar9 == iVar10) goto LAB_0071336b;
} while (iVar13 != iVar9);
}
iVar10 = piVar7[iVar9 * 2 + 1];
if (*(int *)(this + 0x474) == iVar10) goto LAB_007133b4;
}
if (iVar13 + 1 == iVar3) break;
iVar13 = iVar13 + 1;
piVar7 = *(int **)(pCVar6 + iVar4 * 4 + 0x58);
iVar10 = *piVar7;
} while( true );
}
iVar4 = iVar4 + 1;
} while (iVar4 != 4);
local_188 = (float)((int)local_188 + 1);
if (*(int *)(this + 0x4e0) <= (int)local_188) goto LAB_007129bc;
piVar7 = *(int **)(this + 0x4d4);
goto LAB_0071331a;
}
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.