CBaseEntity::CalcAbsolutePosition
0x00609c20 · 503 bytes · __thiscall
_ZN11CBaseEntity20CalcAbsolutePositionEv
Decompiled
undefined (1 param)
/* CBaseEntity::CalcAbsolutePosition() */
void __thiscall CBaseEntity::CalcAbsolutePosition(CBaseEntity *this)
{
matrix3x4_t *pmVar1;
uint uVar2;
CBaseEntity *this_00;
char cVar3;
matrix3x4_t *pmVar4;
undefined *puVar5;
undefined4 uVar6;
matrix3x4_t local_7c [48];
matrix3x4_t local_4c [60];
if ((*(uint *)(this + 0x14c) & 0x800) == 0) {
return;
}
pmVar1 = (matrix3x4_t *)(this + 0x28c);
*(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) & 0xfffff7ff;
AngleMatrix((QAngle *)(this + 0x3a8),(Vector *)(this + 0x39c),pmVar1);
uVar2 = *(uint *)(this + 0x188);
if ((((uVar2 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar2 >> 0xc)) ||
(this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 == (CBaseEntity *)0x0)) {
*(undefined4 *)(this + 0x2e0) = *(undefined4 *)(this + 0x39c);
*(undefined4 *)(this + 0x2e4) = *(undefined4 *)(this + 0x3a0);
*(undefined4 *)(this + 0x2e8) = *(undefined4 *)(this + 0x3a4);
*(undefined4 *)(this + 0x37c) = *(undefined4 *)(this + 0x3a8);
*(undefined4 *)(this + 0x380) = *(undefined4 *)(this + 0x3ac);
uVar6 = *(undefined4 *)(this + 0x3b0);
}
else {
pmVar4 = (matrix3x4_t *)GetParentToWorldTransform(this,local_4c);
ConcatTransforms(pmVar4,pmVar1,local_7c);
MatrixCopy(local_7c,pmVar1);
MatrixGetColumn(pmVar1,3,(Vector *)(this + 0x2e0));
if (((*(float *)(this + 0x3a8) != vec3_angle) || (DAT_01053d40 != *(float *)(this + 0x3ac))) ||
((DAT_01053d44 != *(float *)(this + 0x3b0) || (this[0x185] != (CBaseEntity)0x0)))) {
MatrixAngles(pmVar1,(float *)(this + 0x37c));
goto LAB_00609cfc;
}
if (((byte)this_00[0x14d] & 8) != 0) {
CalcAbsolutePosition(this_00);
}
*(undefined4 *)(this + 0x37c) = *(undefined4 *)(this_00 + 0x37c);
*(undefined4 *)(this + 0x380) = *(undefined4 *)(this_00 + 0x380);
uVar6 = *(undefined4 *)(this_00 + 900);
}
*(undefined4 *)(this + 900) = uVar6;
LAB_00609cfc:
cVar3 = HasDataObjectType(this,4);
if (cVar3 == '\0') {
return;
}
ReportPositionChanged(this);
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.