CTerrorPlayer::TestHitboxes
0x009bcff0 · 624 bytes · __thiscall
_ZN13CTerrorPlayer12TestHitboxesERK5Ray_tjR10CGameTrace
Decompiled
undefined (4 params)
/* CTerrorPlayer::TestHitboxes(Ray_t const&, unsigned int, CGameTrace&) */
undefined4 __thiscall
CTerrorPlayer::TestHitboxes(CTerrorPlayer *this,Ray_t *param_1,uint param_2,CGameTrace *param_3)
{
mstudiohitboxset_t *pmVar1;
CBoneCache *this_00;
int iVar2;
CStudioHdr *pCVar3;
int local_234;
undefined4 local_230;
undefined4 local_22c;
undefined4 local_228;
int local_224;
undefined4 local_220;
matrix3x4_t *local_21c [131];
pCVar3 = *(CStudioHdr **)(this + 0x13e0);
if (pCVar3 == (CStudioHdr *)0x0) {
iVar2 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar2 == 0) {
pCVar3 = *(CStudioHdr **)(this + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
pCVar3 = *(CStudioHdr **)(this + 0x13e0);
}
if (pCVar3 == (CStudioHdr *)0x0) {
return 0;
}
}
iVar2 = *(int *)pCVar3;
if (iVar2 != 0) {
pmVar1 = (mstudiohitboxset_t *)(iVar2 + *(int *)(iVar2 + 0xb0) + *(int *)(this + 0x460) * 0xc);
if (pmVar1 == (mstudiohitboxset_t *)0x0) {
return 0;
}
if (*(int *)(pmVar1 + 4) != 0) {
this_00 = (CBoneCache *)CBaseAnimating::GetBoneCache((CBaseAnimating *)this);
CBoneCache::ReadCachedBonePointers(this_00,local_21c,*(int *)(*(int *)pCVar3 + 0x9c));
local_230 = 0;
local_22c = 0;
local_228 = 0;
local_224 = 0;
local_220 = 0;
local_234 = 1;
/* try { // try from 009bd0cd to 009bd1ef has its CatchHandler @ 009bd26d */
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,0,&local_234);
local_234 = 3;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
local_234 = 2;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
local_234 = 5;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
local_234 = 4;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
local_234 = 0;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
local_234 = 7;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
local_234 = 6;
CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
((CUtlVector<int,CUtlMemory<int,int>> *)&local_230,local_224,&local_234);
TraceToStudioGrouped
(physprops,param_1,pCVar3,pmVar1,local_21c,param_2,param_3,(CUtlVector *)&local_230)
;
local_224 = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&local_230);
local_220 = local_230;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)&local_230);
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.