CM_TransformedPointContents
0x0011a1a0 · 338 bytes · __cdecl
_Z27CM_TransformedPointContentsRK6VectoriS1_RK6QAngle
Decompiled
undefined (4 params)
/* CM_TransformedPointContents(Vector const&, int, Vector const&, QAngle const&) */
undefined4 CM_TransformedPointContents(Vector *param_1,int param_2,Vector *param_3,QAngle *param_4)
{
int iVar1;
float fVar2;
float fVar3;
float fVar4;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
fVar3 = *(float *)param_1 - *(float *)param_3;
fVar4 = *(float *)(param_1 + 4) - *(float *)(param_3 + 4);
fVar2 = *(float *)(param_1 + 8) - *(float *)(param_3 + 8);
local_3c = fVar3;
local_38 = fVar4;
local_34 = fVar2;
if (((*(float *)param_4 != 0.0) || (*(float *)(param_4 + 4) != 0.0)) ||
(*(float *)(param_4 + 8) != 0.0)) {
AngleVectors(param_4,(Vector *)&local_30,(Vector *)&local_24,(Vector *)&local_18);
local_3c = local_2c * fVar4 + local_30 * fVar3 + local_28 * fVar2;
local_38 = -(local_20 * fVar4 + local_24 * fVar3 + local_1c * fVar2);
local_34 = fVar4 * local_14 + fVar3 * local_18 + fVar2 * local_10;
}
iVar1 = CM_PointLeafnum_r((CCollisionBSPData *)&g_BSPData,(Vector *)&local_3c,param_2);
if ((iVar1 < 0) || (DAT_0039439c <= iVar1)) {
Error("Cannot load corrupted map.\n");
}
return *(undefined4 *)(iVar1 * 0x10 + DAT_00394398);
}
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.