CBaseAnimating::DrawServerHitboxes
0x005e5cf0 · 543 bytes · __thiscall
_ZN14CBaseAnimating18DrawServerHitboxesEfb
Decompiled
undefined (3 params)
/* CBaseAnimating::DrawServerHitboxes(float, bool) */
void __thiscall CBaseAnimating::DrawServerHitboxes(CBaseAnimating *this,float param_1,bool param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int *piVar4;
int iVar5;
int local_58;
int local_54;
int local_50;
Vector local_4c [12];
QAngle local_40 [12];
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
piVar2 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
piVar4 = *(int **)(this + 0x13e0);
if (piVar4 == (int *)0x0) {
/* try { // try from 005e5ed9 to 005e5eec has its CatchHandler @ 005e5f11 */
iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar5 != 0) {
LockStudioHdr(this);
}
piVar4 = *(int **)(this + 0x13e0);
if (piVar4 == (int *)0x0) goto LAB_005e5efe;
}
iVar5 = *piVar4;
if ((iVar5 != 0) &&
(iVar5 = *(int *)(iVar5 + 0xb0) + *(int *)(this + 0x460) * 0xc + iVar5, iVar5 != 0)) {
if (0 < *(int *)(iVar5 + 4)) {
iVar3 = 0;
local_58 = 0xff;
local_54 = 0;
local_50 = 0;
do {
while( true ) {
if ((*(int *)(sv_showonlyhitbox._28_4_ + 0x30) != -1) &&
(iVar3 != *(int *)(sv_showonlyhitbox._28_4_ + 0x30))) break;
piVar4 = (int *)(iVar3 * 0x44 + *(int *)(iVar5 + 8) + iVar5);
/* try { // try from 005e5db6 to 005e5eb3 has its CatchHandler @ 005e5f11 */
GetBonePosition(this,*piVar4,local_4c,local_40);
if (!param_2) {
iVar1 = (piVar4[1] % 8) * 0xc;
local_50 = (int)(*(float *)(hullcolor + (piVar4[1] % 8) * 0xc) * 255.0);
local_54 = (int)(*(float *)(hullcolor + iVar1 + 4) * 255.0);
local_58 = (int)(*(float *)(hullcolor + iVar1 + 8) * 255.0);
}
local_2c = *(float *)(this + 0x464);
local_28 = (float)piVar4[5] * local_2c;
local_24 = (float)piVar4[6] * local_2c;
local_20 = (float)piVar4[7] * local_2c;
local_34 = (float)piVar4[2] * local_2c;
local_30 = (float)piVar4[3] * local_2c;
local_2c = local_2c * (float)piVar4[4];
NDebugOverlay::BoxAngles
(local_4c,(Vector *)&local_34,(Vector *)&local_28,local_40,local_50,local_54,
local_58,0,param_1);
iVar3 = iVar3 + 1;
if (*(int *)(iVar5 + 4) <= iVar3) goto LAB_005e5ec0;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(iVar5 + 4));
}
LAB_005e5ec0:
(**(code **)(*piVar2 + 0x6c))(piVar2);
return;
}
LAB_005e5efe:
(**(code **)(*piVar2 + 0x6c))(piVar2);
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.