CEngineTrace::GetBrushInfo
0x0015c6e0 · 516 bytes · __thiscall
_ZN12CEngineTrace12GetBrushInfoEiP10CUtlVectorI8Vector4D10CUtlMemoryIS1_iEEPi
Decompiled
undefined (4 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CEngineTrace::GetBrushInfo(int, CUtlVector<Vector4D, CUtlMemory<Vector4D, int> >*, int*) */
undefined4 __thiscall
CEngineTrace::GetBrushInfo(CEngineTrace *this,int param_1,CUtlVector *param_2,int *param_3)
{
ushort uVar1;
undefined4 *puVar2;
undefined4 uVar3;
uint *puVar4;
uint uVar5;
undefined4 *puVar6;
int iVar7;
int *apiStack_38 [2];
CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *local_30;
int *local_2c [3];
uint local_20;
uVar3 = 0;
if ((-1 < param_1) && (param_1 < DAT_003943c0)) {
if (DAT_003943c8 <= param_1) {
Error("Cannot load corrupted map.\n");
}
apiStack_38[1] = (int *)(DAT_003943c4 + param_1 * 8);
if (param_2 != (CUtlVector *)0x0) {
*(undefined4 *)(param_2 + 0xc) = 0;
if (*(ushort *)(apiStack_38[1] + 1) == 0xffff) {
uVar1 = *(ushort *)((int)apiStack_38[1] + 6);
if (DAT_00394378 <= (int)(uint)uVar1) {
Error("Cannot load corrupted map.\n");
}
iVar7 = 0;
puVar4 = (uint *)((uint)uVar1 * 0x30 + _DAT_00394374 + 0x10);
do {
local_2c[0] = (int *)0x0;
local_2c[1] = (int *)0x0;
local_2c[2] = (int *)0x0;
if (iVar7 < 3) {
*(undefined4 *)((Vector4D *)local_2c + iVar7 * 4) = 0x3f800000;
local_20 = *puVar4;
}
else {
apiStack_38[iVar7] = (int *)0xbf800000;
local_20 = puVar4[-7] ^ 0x80000000;
}
iVar7 = iVar7 + 1;
puVar4 = puVar4 + 1;
local_30 = (CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)param_2;
CUtlVector<Vector4D,CUtlMemory<Vector4D,int>>::InsertBefore
((CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)param_2,
*(int *)(param_2 + 0xc),(Vector4D *)local_2c);
param_2 = (CUtlVector *)local_30;
} while (iVar7 != 6);
}
else {
uVar5 = (uint)*(ushort *)((int)apiStack_38[1] + 6);
if ((int)uVar5 < DAT_0039436c) {
puVar6 = (undefined4 *)(DAT_00394368 + uVar5 * 8);
local_30 = (CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)
(puVar6 + (uint)*(ushort *)(apiStack_38[1] + 1) * 2);
}
else {
Error("Cannot load corrupted map.\n");
local_30 = (CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)
(DAT_00394368 + uVar5 * 8 + (uint)*(ushort *)(apiStack_38[1] + 1) * 8);
uVar1 = *(ushort *)((int)apiStack_38[1] + 6);
if (DAT_0039436c <= (int)(uint)uVar1) {
Error("Cannot load corrupted map.\n");
}
puVar6 = (undefined4 *)(DAT_00394368 + (uint)uVar1 * 8);
}
if (local_30 != (CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)puVar6) {
do {
puVar2 = (undefined4 *)*puVar6;
puVar6 = puVar6 + 2;
local_20 = puVar2[3];
local_2c[2] = (int *)puVar2[2];
local_2c[1] = (int *)puVar2[1];
local_2c[0] = (int *)*puVar2;
CUtlVector<Vector4D,CUtlMemory<Vector4D,int>>::InsertBefore
((CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)param_2,
*(int *)(param_2 + 0xc),(Vector4D *)local_2c);
} while (local_30 != (CUtlVector<Vector4D,CUtlMemory<Vector4D,int>> *)puVar6);
}
}
}
if (param_3 == (int *)0x0) {
uVar3 = 1;
}
else {
*param_3 = *apiStack_38[1];
uVar3 = 1;
}
}
return uVar3;
}
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.