CM_WorldSpaceCenter
0x0011bd10 · 287 bytes · __cdecl
_Z19CM_WorldSpaceCenterP12ICollideableP6Vector
Decompiled
undefined (2 params)
/* CM_WorldSpaceCenter(ICollideable*, Vector*) */
void CM_WorldSpaceCenter(ICollideable *param_1,Vector *param_2)
{
float *pfVar1;
float *pfVar2;
matrix3x4_t *pmVar3;
float local_18;
float local_14;
float local_10;
pfVar1 = (float *)(**(code **)(*(int *)param_1 + 8))(param_1);
pfVar2 = (float *)(**(code **)(*(int *)param_1 + 4))(param_1);
local_10 = (pfVar1[2] + pfVar2[2]) * 0.5;
local_18 = (*pfVar1 + *pfVar2) * 0.5;
local_14 = (pfVar1[1] + pfVar2[1]) * 0.5;
pfVar1 = (float *)(**(code **)(*(int *)param_1 + 0x24))(param_1);
if ((((vec3_angle != *pfVar1) || (DAT_004024c0 != pfVar1[1])) || (DAT_004024c4 != pfVar1[2])) &&
(((vec3_origin != local_18 || (DAT_004024cc != local_14)) || (DAT_004024d0 != local_10)))) {
pmVar3 = (matrix3x4_t *)(**(code **)(*(int *)param_1 + 0x28))(param_1);
VectorTransform(&local_18,pmVar3,(float *)param_2);
return;
}
pfVar1 = (float *)(**(code **)(*(int *)param_1 + 0x20))(param_1);
*(float *)param_2 = *pfVar1 + local_18;
*(float *)(param_2 + 4) = pfVar1[1] + local_14;
*(float *)(param_2 + 8) = pfVar1[2] + local_10;
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.