UTIL_ParentToWorldSpace
0x00b2f080 · 423 bytes · __cdecl
_Z23UTIL_ParentToWorldSpaceP11CBaseEntityR6VectorR6QAngle
Decompiled
undefined (3 params)
/* UTIL_ParentToWorldSpace(CBaseEntity*, Vector&, QAngle&) */
void UTIL_ParentToWorldSpace(CBaseEntity *param_1,Vector *param_2,QAngle *param_3)
{
uint uVar1;
undefined4 *puVar2;
undefined *puVar3;
matrix3x4_t local_dc [48];
matrix3x4_t local_ac [48];
matrix3x4_t local_7c [48];
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if (param_1 != (CBaseEntity *)0x0) {
AngleMatrix(param_3,local_dc);
MatrixSetColumn(param_2,3,local_dc);
uVar1 = *(uint *)(param_1 + 0x180);
if ((((uVar1 == 0xffffffff) ||
(puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar3 + 4) == 0)) {
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_1);
}
local_4c = *(undefined4 *)(param_1 + 0x28c);
local_48 = *(undefined4 *)(param_1 + 0x290);
local_44 = *(undefined4 *)(param_1 + 0x294);
local_40 = *(undefined4 *)(param_1 + 0x298);
local_3c = *(undefined4 *)(param_1 + 0x29c);
local_38 = *(undefined4 *)(param_1 + 0x2a0);
local_34 = *(undefined4 *)(param_1 + 0x2a4);
local_30 = *(undefined4 *)(param_1 + 0x2a8);
local_2c = *(undefined4 *)(param_1 + 0x2ac);
local_28 = *(undefined4 *)(param_1 + 0x2b0);
local_24 = *(undefined4 *)(param_1 + 0x2b4);
local_20 = *(undefined4 *)(param_1 + 0x2b8);
}
else {
puVar2 = (undefined4 *)CBaseEntity::GetParentToWorldTransform(param_1,local_ac);
local_4c = *puVar2;
local_48 = puVar2[1];
local_44 = puVar2[2];
local_40 = puVar2[3];
local_3c = puVar2[4];
local_38 = puVar2[5];
local_34 = puVar2[6];
local_30 = puVar2[7];
local_2c = puVar2[8];
local_28 = puVar2[9];
local_24 = puVar2[10];
local_20 = puVar2[0xb];
}
ConcatTransforms((matrix3x4_t *)&local_4c,local_dc,local_7c);
MatrixGetColumn(local_7c,3,param_2);
MatrixAngles(local_7c,(float *)param_3);
}
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.