ComputePushStartMatrix
0x0060ae80 · 698 bytes · __regparm3
_ZL22ComputePushStartMatrixR11matrix3x4_tP11CBaseEntityRK11pushblock_t
Decompiled
undefined (3 params)
/* ComputePushStartMatrix(matrix3x4_t&, CBaseEntity*, pushblock_t const&) */
void __regparm3
ComputePushStartMatrix(matrix3x4_t *param_1,CBaseEntity *param_2,pushblock_t *param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
int iVar5;
CBaseEntity *this;
uint uVar6;
uint uVar7;
CBaseEntity *pCVar8;
float local_c4;
float local_c0;
float local_bc;
float local_b8;
float local_b4;
float local_b0;
matrix3x4_t local_ac [48];
matrix3x4_t local_7c [48];
matrix3x4_t local_4c [60];
iVar5 = *(int *)param_3;
if (iVar5 == 0) {
pCVar8 = *(CBaseEntity **)(param_3 + 4);
fVar1 = *(float *)(param_3 + 0x10);
uVar6 = *(uint *)(pCVar8 + 0x14c);
this = pCVar8;
if ((uVar6 & 0x1000) != 0) {
CBaseEntity::CalcAbsoluteVelocity(pCVar8);
this = *(CBaseEntity **)(param_3 + 4);
uVar6 = *(uint *)(this + 0x14c);
}
fVar2 = *(float *)(pCVar8 + 0x274);
fVar3 = *(float *)(pCVar8 + 0x278);
fVar4 = *(float *)(pCVar8 + 0x27c);
uVar7 = 0;
pCVar8 = this;
if ((uVar6 & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition(this);
pCVar8 = *(CBaseEntity **)(param_3 + 4);
uVar7 = *(uint *)(pCVar8 + 0x14c) & 0x800;
}
local_c0 = *(float *)(this + 0x2e4) - fVar3 * fVar1;
local_bc = *(float *)(this + 0x2e8) - fVar1 * fVar4;
local_c4 = *(float *)(this + 0x2e0) - fVar2 * fVar1;
fVar1 = *(float *)(pCVar8 + 0x280);
fVar2 = *(float *)(pCVar8 + 0x284);
fVar3 = *(float *)(param_3 + 0x10);
fVar4 = *(float *)(pCVar8 + 0x288);
if (uVar7 != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar8);
}
local_b4 = *(float *)(pCVar8 + 0x380) - fVar2 * fVar3;
local_b0 = *(float *)(pCVar8 + 900) - fVar3 * fVar4;
local_b8 = *(float *)(pCVar8 + 0x37c) - fVar1 * fVar3;
}
else {
local_c4 = *(float *)(iVar5 + 4);
local_c0 = *(float *)(iVar5 + 8);
local_bc = *(float *)(iVar5 + 0xc);
local_b8 = *(float *)(iVar5 + 0x10);
local_b4 = *(float *)(iVar5 + 0x14);
local_b0 = *(float *)(iVar5 + 0x18);
}
AngleMatrix((QAngle *)&local_b8,(Vector *)&local_c4,local_ac);
pCVar8 = *(CBaseEntity **)(param_3 + 4);
if (((byte)pCVar8[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar8);
}
MatrixInvert((matrix3x4_t *)(pCVar8 + 0x28c),local_4c);
ConcatTransforms(local_ac,local_4c,local_7c);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_2);
}
ConcatTransforms(local_7c,(matrix3x4_t *)(param_2 + 0x28c),param_1);
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.