CCoreDispInfo::CalcTriSurfPlanes
0x000be860 · 337 bytes · __thiscall
_ZN13CCoreDispInfo17CalcTriSurfPlanesEiPA3_i
Decompiled
undefined (3 params)
/* CCoreDispInfo::CalcTriSurfPlanes(int, int (*) [3]) */
void __thiscall CCoreDispInfo::CalcTriSurfPlanes(CCoreDispInfo *this,int param_1,int *param_2)
{
float *pfVar1;
float fVar2;
float fVar3;
float fVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
float fVar9;
float fVar10;
float fVar11;
float fVar12;
float fVar13;
float fVar14;
float local_28;
float local_24;
float local_20;
iVar8 = 0;
do {
iVar6 = *(int *)(this + 0x1b8);
iVar5 = *param_2 * 0x90 + iVar6;
fVar2 = *(float *)(iVar5 + 0x2c);
fVar3 = *(float *)(iVar5 + 0x28);
iVar7 = param_2[2] * 0x90 + iVar6;
fVar4 = *(float *)(iVar5 + 0x30);
fVar10 = *(float *)(iVar7 + 0x2c) - fVar2;
fVar14 = *(float *)(iVar7 + 0x30) - fVar4;
iVar6 = param_2[1] * 0x90 + iVar6;
fVar13 = *(float *)(iVar6 + 0x30) - fVar4;
fVar9 = *(float *)(iVar6 + 0x28) - fVar3;
fVar11 = *(float *)(iVar6 + 0x2c) - fVar2;
fVar12 = *(float *)(iVar7 + 0x28) - fVar3;
local_28 = fVar10 * fVar13 - fVar14 * fVar11;
local_24 = fVar14 * fVar9 - fVar13 * fVar12;
local_20 = fVar11 * fVar12 - fVar9 * fVar10;
VectorNormalize((Vector *)&local_28);
iVar5 = iVar8 * 0x14;
iVar8 = iVar8 + 1;
iVar6 = *(int *)(this + 4) + param_1 * 0x200;
pfVar1 = (float *)(iVar6 + 0x100 + iVar5);
*pfVar1 = local_28;
pfVar1[1] = local_24;
pfVar1[2] = local_20;
*(float *)(iVar6 + 0x10c + iVar5) = fVar2 * local_24 + fVar3 * local_28 + fVar4 * local_20;
param_2 = param_2 + 3;
} while (iVar8 != 8);
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.