R_GetBrushModelPlane
0x001677f0 · 155 bytes · __cdecl
_Z20R_GetBrushModelPlanePK7model_tiP6Vector
Decompiled
undefined (3 params)
/* R_GetBrushModelPlane(model_t const*, int, Vector*) */
undefined4 R_GetBrushModelPlane(model_t *param_1,int param_2,Vector *param_3)
{
undefined4 *puVar1;
float fVar2;
int iVar3;
float *pfVar4;
int iVar5;
iVar3 = *(int *)(param_1 + 0x134);
iVar5 = *(int *)(param_1 + 0x138) * 0x20 + *(int *)(iVar3 + 0x78) + param_2 * 0x20;
if (param_3 != (Vector *)0x0) {
if (*(char *)(iVar5 + 3) == '\0') {
pfVar4 = *(float **)(iVar5 + 4);
fVar2 = pfVar4[3];
*(float *)param_3 = *pfVar4 * fVar2;
*(float *)(param_3 + 4) = pfVar4[1] * fVar2;
*(float *)(param_3 + 8) = fVar2 * pfVar4[2];
return *(undefined4 *)(iVar5 + 4);
}
puVar1 = (undefined4 *)
(*(int *)(iVar3 + 0x20) +
(uint)*(ushort *)(*(int *)(iVar3 + 0x88) + *(int *)(iVar5 + 8) * 2) * 0xc);
*(undefined4 *)param_3 = *puVar1;
*(undefined4 *)(param_3 + 4) = puVar1[1];
*(undefined4 *)(param_3 + 8) = puVar1[2];
}
return *(undefined4 *)(iVar5 + 4);
}
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.