CEdgeList::ReduceActiveList
0x001cde30 · 771 bytes · __thiscall
_ZN9CEdgeList16ReduceActiveListER15CWingedEdgeList
Decompiled
undefined (2 params)
/* CEdgeList::ReduceActiveList(CWingedEdgeList&) */
void __thiscall CEdgeList::ReduceActiveList(CEdgeList *this,CWingedEdgeList *param_1)
{
int *piVar1;
undefined4 uVar2;
float fVar3;
CWingedEdgeList *pCVar4;
int iVar5;
undefined1 *puVar6;
int iVar7;
int iVar8;
int iVar9;
int in_GS_OFFSET;
longdouble lVar10;
float fVar11;
float fStackY_160;
int aiStack_14c [3];
CWingedEdgeList *local_140;
int local_13c;
float local_138;
int local_134;
float local_130;
int local_12c;
int local_128 [2];
undefined1 local_120 [256];
int local_20;
local_140 = param_1;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
aiStack_14c[2] = *(int *)(this + 0x3c);
puVar6 = &stack0xfffffea4;
if (*(int *)(this + 0x3c) != 0) {
iVar5 = *(int *)(this + 0xb0);
iVar7 = 0;
if (0 < iVar5) {
do {
iVar8 = iVar7 + 1;
fStackY_160 = 2.651236e-39;
CWingedEdgeList::AddSurface(local_140,(cplane_t *)(*(int *)(this + 0xa4) + iVar7 * 0x28));
iVar7 = iVar8;
} while (iVar8 != iVar5);
}
*(undefined4 *)(this + 0x134) = 0;
*(undefined4 *)(this + 0x138) = 0;
*(undefined4 *)(this + 0x11c) = 0;
iVar5 = (aiStack_14c[2] * 8 + 0xfU & 0xfffffff0) + 0x10;
iVar7 = iVar5 * -2;
iVar5 = (int)&local_140 - iVar5;
local_128[0] = iVar5;
local_128[1] = (int)&local_140 + iVar7;
fVar11 = *(float *)((uint)**(ushort **)(this + 0x30) * 0x30 + *(int *)this + 4);
*(CEdgeList **)(this + 0x9c) = this + 0x44;
*(CEdgeList **)(this + 0x70) = this + 0x74;
if (fVar11 <= -1.0) {
fVar11 = -1.0;
}
*(CEdgeList **)(this + 0x124) = this + 0x74;
*(CEdgeList **)(this + 0xe8) = this + 0xf4;
*(CEdgeList **)(this + 0x10c) = this + 0xcc;
*(undefined4 *)(this + 0x128) = *(undefined4 *)(this + 0x94);
*(undefined4 *)(this + 0x120) = 0x7f7fffff;
*(float *)(&stack0xfffffea8 + iVar7) = fVar11;
*(CEdgeList **)(&stack0xfffffea4 + iVar7) = this;
local_130 = fVar11;
*(undefined4 *)((int)&fStackY_160 + iVar7) = 0x1cdf5c;
IntroduceNewActiveEdges
(*(CEdgeList **)(&stack0xfffffea4 + iVar7),*(float *)(&stack0xfffffea8 + iVar7));
local_12c = 0;
local_134 = 0;
iVar8 = (int)&local_140 + iVar7;
do {
iVar9 = iVar8;
fVar11 = local_130;
*(float *)(&stack0xfffffeac + iVar7) = local_130;
*(undefined1 **)((int)aiStack_14c + iVar7) = local_120;
*(int **)(&stack0xfffffeb0 + iVar7) = &local_12c;
uVar2 = *(undefined4 *)(this + 0x120);
*(CEdgeList **)(&stack0xfffffea4 + iVar7) = this;
local_138 = fVar11;
*(undefined4 *)(&stack0xfffffea8 + iVar7) = uVar2;
*(undefined4 *)((int)&fStackY_160 + iVar7) = 0x1ce018;
lVar10 = (longdouble)
LocateEdgeCrossingDiscontinuity
(*(CEdgeList **)(&stack0xfffffea4 + iVar7),
*(float *)(&stack0xfffffea8 + iVar7),*(float *)(&stack0xfffffeac + iVar7),
*(int **)(&stack0xfffffeb0 + iVar7),
*(Edge_t ***)((int)aiStack_14c + iVar7));
pCVar4 = local_140;
fVar11 = (float)lVar10;
local_130 = fVar11;
*(int *)(this + 0x130) = iVar5;
*(int *)(this + 300) = iVar9;
*(undefined4 *)(this + 0x138) = *(undefined4 *)(this + 0x134);
local_13c = 1 - local_134;
*(undefined4 *)(this + 0x134) = 0;
if (1.001 <= fVar11) {
local_130 = 1.001;
}
*(float *)(&stack0xfffffeac + iVar7) = local_138;
fVar3 = local_130;
*(CEdgeList **)(&stack0xfffffea4 + iVar7) = this;
*(float *)(&stack0xfffffeb0 + iVar7) = fVar3;
*(CWingedEdgeList **)(&stack0xfffffea8 + iVar7) = pCVar4;
*(undefined4 *)((int)&fStackY_160 + iVar7) = 0x1ce0a1;
ReduceActiveEdgeList
(*(CEdgeList **)(&stack0xfffffea4 + iVar7),
*(CWingedEdgeList **)(&stack0xfffffea8 + iVar7),
*(float *)(&stack0xfffffeac + iVar7),*(float *)(&stack0xfffffeb0 + iVar7));
fVar3 = local_130;
*(CEdgeList **)(&stack0xfffffea4 + iVar7) = this;
*(float *)(&stack0xfffffea8 + iVar7) = fVar3;
*(undefined4 *)((int)&fStackY_160 + iVar7) = 0x1ce0b7;
AdvanceActiveEdgeList
(*(CEdgeList **)(&stack0xfffffea4 + iVar7),*(float *)(&stack0xfffffea8 + iVar7));
fVar3 = local_130;
if (local_12c == 0) {
*(CEdgeList **)(&stack0xfffffea4 + iVar7) = this;
*(float *)(&stack0xfffffea8 + iVar7) = fVar3;
*(undefined4 *)((int)&fStackY_160 + iVar7) = 0x1cdf9e;
IntroduceNewActiveEdges
(*(CEdgeList **)(&stack0xfffffea4 + iVar7),*(float *)(&stack0xfffffea8 + iVar7));
puVar6 = &stack0xfffffea4 + iVar7;
if (*(float *)(this + 0x120) == 3.4028235e+38) break;
}
else {
*(int *)(&stack0xfffffea8 + iVar7) = local_12c;
*(undefined1 **)(&stack0xfffffeac + iVar7) = local_120;
*(CEdgeList **)(&stack0xfffffea4 + iVar7) = this;
*(undefined4 *)((int)&fStackY_160 + iVar7) = 0x1ce0db;
ReorderActiveEdgeList
(*(CEdgeList **)(&stack0xfffffea4 + iVar7),*(int *)(&stack0xfffffea8 + iVar7),
*(Edge_t ***)(&stack0xfffffeac + iVar7));
if ((*(int *)(this + 0x11c) < aiStack_14c[2]) &&
(fVar3 = *(float *)((uint)*(ushort *)(*(int *)(this + 0x30) + *(int *)(this + 0x11c) * 2)
* 0x30 + *(int *)this + 4), fVar3 < *(float *)(this + 0x120))) {
*(float *)(this + 0x120) = fVar3;
}
}
puVar6 = &stack0xfffffea4 + iVar7;
if (1.001 <= fVar11) break;
piVar1 = local_128 + local_134;
local_134 = local_13c;
iVar8 = *piVar1;
iVar5 = iVar9;
} while( true );
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)(puVar6 + -4) = &UNK_001ce139;
__stack_chk_fail();
}
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.