CBaseAnimating::GetHitboxesFrontside
0x005e7270 · 411 bytes · __thiscall
_ZN14CBaseAnimating20GetHitboxesFrontsideEPiiRK6Vectorf
Decompiled
undefined (5 params)
/* CBaseAnimating::GetHitboxesFrontside(int*, int, Vector const&, float) */
int __thiscall
CBaseAnimating::GetHitboxesFrontside
(CBaseAnimating *this,int *param_1,int param_2,Vector *param_3,float param_4)
{
int *piVar1;
undefined4 *puVar2;
int iVar3;
int iVar4;
int local_78;
float local_64;
float local_60;
float local_5c;
float local_58;
float local_54;
float local_50;
matrix3x4_t local_4c [60];
piVar1 = *(int **)(this + 0x13e0);
if (piVar1 == (int *)0x0) {
iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar4 == 0) {
piVar1 = *(int **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
piVar1 = *(int **)(this + 0x13e0);
}
if (piVar1 == (int *)0x0) {
return 0;
}
}
iVar4 = *piVar1;
if (((iVar4 != 0) &&
(iVar4 = *(int *)(iVar4 + 0xb0) + *(int *)(this + 0x460) * 0xc + iVar4, iVar4 != 0)) &&
(0 < *(int *)(iVar4 + 4))) {
local_78 = 0;
iVar3 = 0;
do {
puVar2 = (undefined4 *)(iVar3 * 0x44 + *(int *)(iVar4 + 8) + iVar4);
(**(code **)(*(int *)this + 0x358))(this,*puVar2,local_4c);
local_60 = ((float)puVar2[3] + (float)puVar2[6]) * 0.5;
local_5c = ((float)puVar2[4] + (float)puVar2[7]) * 0.5;
local_64 = ((float)puVar2[2] + (float)puVar2[5]) * 0.5;
VectorTransform(&local_64,local_4c,&local_58);
if ((param_4 <=
*(float *)(param_3 + 4) * local_54 + *(float *)param_3 * local_58 +
*(float *)(param_3 + 8) * local_50) && (local_78 < param_2)) {
param_1[local_78] = iVar3;
local_78 = local_78 + 1;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(iVar4 + 4));
return local_78;
}
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.