Overlay_OverlayPlaneToWorld
0x001d2070 · 234 bytes · __cdecl
_Z27Overlay_OverlayPlaneToWorldRK6VectorP11msurface2_tS1_RS_
Decompiled
undefined (4 params)
/* Overlay_OverlayPlaneToWorld(Vector const&, msurface2_t*, Vector const&, Vector&) */
void Overlay_OverlayPlaneToWorld
(Vector *param_1,msurface2_t *param_2,Vector *param_3,Vector *param_4)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float *pfVar5;
float fVar6;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
pfVar5 = *(float **)(param_2 + 4);
local_30 = *pfVar5;
local_2c = pfVar5[1];
local_28 = pfVar5[2];
local_24 = pfVar5[3];
local_20 = pfVar5[4];
VectorNormalize((Vector *)&local_30);
fVar1 = *(float *)param_3;
fVar2 = *(float *)(param_3 + 8);
fVar3 = *(float *)param_1;
fVar4 = *(float *)(param_1 + 8);
local_24 = (*(float *)(param_3 + 4) * local_2c + fVar1 * local_30 + local_28 * fVar2) - local_24;
fVar6 = local_2c * *(float *)(param_1 + 4) + local_30 * fVar3 + local_28 * fVar4;
if (fVar6 != 0.0) {
local_24 = local_24 / fVar6;
}
*(float *)(param_4 + 4) = *(float *)(param_3 + 4) - *(float *)(param_1 + 4) * local_24;
*(float *)param_4 = fVar1 - fVar3 * local_24;
*(float *)(param_4 + 8) = fVar2 - local_24 * fVar4;
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.