CBaseAnimating::ComputeHitboxSurroundingBox
0x005e6940 · 552 bytes · __thiscall
_ZN14CBaseAnimating27ComputeHitboxSurroundingBoxEP6VectorS1_
Decompiled
undefined (3 params)
/* CBaseAnimating::ComputeHitboxSurroundingBox(Vector*, Vector*) */
undefined4 __thiscall
CBaseAnimating::ComputeHitboxSurroundingBox(CBaseAnimating *this,Vector *param_1,Vector *param_2)
{
CBoneCache *this_00;
matrix3x4_t *pmVar1;
int *piVar2;
int iVar3;
int iVar4;
float fVar5;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
piVar2 = *(int **)(this + 0x13e0);
if (piVar2 == (int *)0x0) {
iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar4 == 0) {
piVar2 = *(int **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
piVar2 = *(int **)(this + 0x13e0);
}
if (piVar2 == (int *)0x0) {
return 0;
}
}
iVar4 = *piVar2;
if (((iVar4 != 0) &&
(iVar4 = *(int *)(iVar4 + 0xb0) + *(int *)(this + 0x460) * 0xc + iVar4, iVar4 != 0)) &&
(*(int *)(iVar4 + 4) != 0)) {
this_00 = (CBoneCache *)GetBoneCache(this);
*(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 (0 < *(int *)(iVar4 + 4)) {
iVar3 = 0;
do {
piVar2 = (int *)(iVar3 * 0x44 + *(int *)(iVar4 + 8) + iVar4);
pmVar1 = (matrix3x4_t *)CBoneCache::GetCachedBone(this_00,*piVar2);
if (pmVar1 != (matrix3x4_t *)0x0) {
local_2c = *(float *)(this + 0x464);
local_28 = (float)piVar2[5] * local_2c;
local_24 = (float)piVar2[6] * local_2c;
local_20 = (float)piVar2[7] * local_2c;
local_34 = (float)piVar2[2] * local_2c;
local_30 = (float)piVar2[3] * local_2c;
local_2c = local_2c * (float)piVar2[4];
TransformAABB(pmVar1,(Vector *)&local_34,(Vector *)&local_28,(Vector *)&local_4c,
(Vector *)&local_40);
fVar5 = *(float *)param_1;
if (local_4c <= *(float *)param_1) {
fVar5 = local_4c;
}
*(float *)param_1 = fVar5;
fVar5 = *(float *)(param_1 + 4);
if (local_48 <= *(float *)(param_1 + 4)) {
fVar5 = local_48;
}
*(float *)(param_1 + 4) = fVar5;
fVar5 = *(float *)(param_1 + 8);
if (local_44 <= *(float *)(param_1 + 8)) {
fVar5 = local_44;
}
*(float *)(param_1 + 8) = fVar5;
fVar5 = *(float *)param_2;
if (*(float *)param_2 <= local_40) {
fVar5 = local_40;
}
*(float *)param_2 = fVar5;
fVar5 = *(float *)(param_2 + 4);
if (*(float *)(param_2 + 4) <= local_3c) {
fVar5 = local_3c;
}
*(float *)(param_2 + 4) = fVar5;
fVar5 = *(float *)(param_2 + 8);
if (*(float *)(param_2 + 8) <= local_38) {
fVar5 = local_38;
}
*(float *)(param_2 + 8) = fVar5;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(iVar4 + 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.