L L4D2node

CBaseAnimating::TestHitboxes

0x005e5620 · 408 bytes · __thiscall

_ZN14CBaseAnimating12TestHitboxesERK5Ray_tjR10CGameTrace

Decompiled

undefined (4 params)

/* CBaseAnimating::TestHitboxes(Ray_t const&, unsigned int, CGameTrace&) */

undefined4 __thiscall
CBaseAnimating::TestHitboxes(CBaseAnimating *this,Ray_t *param_1,uint param_2,CGameTrace *param_3)

{
  float fVar1;
  int iVar2;
  int iVar3;
  mstudiohitboxset_t *pmVar4;
  CBoneCache *this_00;
  undefined4 uVar5;
  int iVar6;
  CStudioHdr *pCVar7;
  matrix3x4_t *local_21c [131];
  
  pCVar7 = *(CStudioHdr **)(this + 0x13e0);
  if (pCVar7 == (CStudioHdr *)0x0) {
    iVar6 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar6 == 0) {
      pCVar7 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      LockStudioHdr(this);
      pCVar7 = *(CStudioHdr **)(this + 0x13e0);
    }
    if (pCVar7 == (CStudioHdr *)0x0) {
      return 0;
    }
  }
  iVar6 = *(int *)pCVar7;
  if (((iVar6 == 0) ||
      (pmVar4 = (mstudiohitboxset_t *)
                (iVar6 + *(int *)(iVar6 + 0xb0) + *(int *)(this + 0x460) * 0xc),
      pmVar4 == (mstudiohitboxset_t *)0x0)) || (*(int *)(pmVar4 + 4) == 0)) {
    return 0;
  }
  this_00 = (CBoneCache *)GetBoneCache(this);
  CBoneCache::ReadCachedBonePointers(this_00,local_21c,*(int *)(*(int *)pCVar7 + 0x9c));
  fVar1 = *(float *)(this + 0x464);
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  uVar5 = TraceToStudio(physprops,param_1,pCVar7,pmVar4,local_21c,param_2,(Vector *)(this + 0x2e0),
                        fVar1,param_3);
  if ((char)uVar5 != '\0') {
    iVar6 = *(int *)pCVar7;
    iVar2 = *(int *)(pmVar4 + *(int *)(param_3 + 0x50) * 0x44 + *(int *)(pmVar4 + 8));
    iVar3 = *(int *)(iVar6 + 0xa0);
    *(undefined **)(param_3 + 0x3c) = &DAT_00c5994b;
    *(undefined2 *)(param_3 + 0x42) = 0x8000;
    *(short *)(param_3 + 0x40) = (short)*(undefined4 *)(iVar6 + 0xb8 + iVar2 * 0xd8 + iVar3);
    return uVar5;
  }
  return 1;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)