CNavMesh::UpdateDragSelectionSet
0x00710240 · 429 bytes · __thiscall
_ZN8CNavMesh22UpdateDragSelectionSetEv
Decompiled
undefined (1 param)
/* CNavMesh::UpdateDragSelectionSet() */
void __thiscall CNavMesh::UpdateDragSelectionSet(CNavMesh *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
CNavArea *this_00;
char cVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
int local_2c;
int local_28;
undefined4 local_24;
CNavMesh local_20;
iVar6 = UTIL_GetListenServerHost();
if (iVar6 != 0) {
fVar1 = *(float *)(this + 0x464);
*(undefined4 *)(this + 0x4f4) = 0;
fVar2 = *(float *)(this + 0x480);
local_24 = 1;
iVar6 = (int)fVar1;
if (fVar2 < fVar1) {
iVar6 = (int)fVar2;
}
fVar3 = *(float *)(this + 0x468);
fVar4 = *(float *)(this + 0x484);
iVar8 = (int)fVar2;
if (fVar2 <= fVar1) {
iVar8 = (int)fVar1;
}
iVar9 = (int)fVar3;
if (fVar4 < fVar3) {
iVar9 = (int)fVar4;
}
local_3c = *(float *)(this + 0x488);
iVar7 = (int)fVar3;
if (fVar3 < fVar4) {
iVar7 = (int)fVar4;
}
local_20 = this[0x4fe];
local_28 = (int)((float)*(int *)(this + 0x500) + local_3c) + 1;
local_44 = (float)iVar6;
local_40 = (float)iVar9;
local_2c = (int)(local_3c - (float)*(int *)(this + 0x504)) + -1;
local_38 = (float)iVar8;
local_34 = (float)iVar7;
if (0 < DAT_00fe6000) {
iVar6 = 0;
local_30 = local_3c;
do {
this_00 = *(CNavArea **)(TheNavAreas + iVar6 * 4);
if (*(int *)(TheNavMesh + 0x4e0) < 1) {
LAB_0071037c:
if (local_20 != (CNavMesh)0x0) goto LAB_00710384;
LAB_007103a3:
cVar5 = CNavArea::IsOverlapping(this_00,(Extent *)&local_44);
if (((cVar5 == '\0') || (*(float *)(this_00 + 0x34) < (float)local_2c)) ||
((float)local_28 < *(float *)(this_00 + 0x34))) goto LAB_00710384;
AddToDragSelectionSet(TheNavMesh,this_00);
if (DAT_00fe6000 <= iVar6 + 1) {
return;
}
}
else {
if (this_00 != (CNavArea *)**(int **)(TheNavMesh + 0x4d4)) {
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == *(int *)(TheNavMesh + 0x4e0)) goto LAB_0071037c;
} while (this_00 != (CNavArea *)(*(int **)(TheNavMesh + 0x4d4))[iVar8]);
}
if (local_20 == (CNavMesh)0x1) goto LAB_007103a3;
LAB_00710384:
if (DAT_00fe6000 <= iVar6 + 1) {
return;
}
}
iVar6 = iVar6 + 1;
} while( true );
}
}
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.