CBaseAnimating::ComputeEntitySpaceHitboxSurroundingBox
0x005e6b80 · 637 bytes · __thiscall
_ZN14CBaseAnimating38ComputeEntitySpaceHitboxSurroundingBoxEP6VectorS1_
Decompiled
undefined (3 params)
/* CBaseAnimating::ComputeEntitySpaceHitboxSurroundingBox(Vector*, Vector*) */
undefined4 __thiscall
CBaseAnimating::ComputeEntitySpaceHitboxSurroundingBox
(CBaseAnimating *this,Vector *param_1,Vector *param_2)
{
int iVar1;
CBoneCache *this_00;
int *piVar2;
int iVar3;
int iVar4;
float fVar5;
float local_294;
float local_290;
float local_28c;
float local_288;
float local_284;
float local_280;
matrix3x4_t local_27c [48];
matrix3x4_t local_24c [48];
matrix3x4_t *local_21c [131];
piVar2 = *(int **)(this + 0x13e0);
if (piVar2 == (int *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar3 == 0) {
piVar2 = *(int **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
piVar2 = *(int **)(this + 0x13e0);
}
if (piVar2 == (int *)0x0) {
return 0;
}
}
iVar3 = *piVar2;
if (((iVar3 != 0) &&
(iVar3 = *(int *)(iVar3 + 0xb0) + *(int *)(this + 0x460) * 0xc + iVar3, iVar3 != 0)) &&
(*(int *)(iVar3 + 4) != 0)) {
this_00 = (CBoneCache *)GetBoneCache(this);
CBoneCache::ReadCachedBonePointers(this_00,local_21c,*(int *)(*piVar2 + 0x9c));
*(undefined4 *)param_1 = 0x7f7fffff;
*(undefined4 *)(param_1 + 4) = 0x7f7fffff;
*(undefined4 *)(param_1 + 8) = 0x7f7fffff;
*(undefined4 *)param_2 = 0xff7fffff;
*(undefined4 *)(param_2 + 4) = 0xff7fffff;
*(undefined4 *)(param_2 + 8) = 0xff7fffff;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
MatrixInvert((matrix3x4_t *)(this + 0x28c),local_27c);
if (0 < *(int *)(iVar3 + 4)) {
iVar4 = 0;
do {
iVar1 = iVar4 * 0x44;
iVar4 = iVar4 + 1;
piVar2 = (int *)(iVar1 + *(int *)(iVar3 + 8) + iVar3);
ConcatTransforms(local_27c,local_21c[*piVar2],local_24c);
TransformAABB(local_24c,(Vector *)(piVar2 + 2),(Vector *)(piVar2 + 5),(Vector *)&local_294,
(Vector *)&local_288);
fVar5 = *(float *)param_1;
if (local_294 <= *(float *)param_1) {
fVar5 = local_294;
}
*(float *)param_1 = fVar5;
fVar5 = *(float *)(param_1 + 4);
if (local_290 <= *(float *)(param_1 + 4)) {
fVar5 = local_290;
}
*(float *)(param_1 + 4) = fVar5;
fVar5 = *(float *)(param_1 + 8);
if (local_28c <= *(float *)(param_1 + 8)) {
fVar5 = local_28c;
}
*(float *)(param_1 + 8) = fVar5;
fVar5 = *(float *)param_2;
if (*(float *)param_2 <= local_288) {
fVar5 = local_288;
}
*(float *)param_2 = fVar5;
fVar5 = *(float *)(param_2 + 4);
if (*(float *)(param_2 + 4) <= local_284) {
fVar5 = local_284;
}
*(float *)(param_2 + 4) = fVar5;
fVar5 = *(float *)(param_2 + 8);
if (*(float *)(param_2 + 8) <= local_280) {
fVar5 = local_280;
}
*(float *)(param_2 + 8) = fVar5;
} while (iVar4 < *(int *)(iVar3 + 4));
}
return 1;
}
return 0;
}
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.