L L4D2node

CBaseAnimating::LookupHitbox

0x005e6fa0 · 315 bytes · __thiscall

_ZN14CBaseAnimating12LookupHitboxEPKcRiS2_

Decompiled

undefined (4 params)

/* CBaseAnimating::LookupHitbox(char const*, int&, int&) */

undefined4 __thiscall
CBaseAnimating::LookupHitbox(CBaseAnimating *this,char *param_1,int *param_2,int *param_3)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int local_28;
  int *local_20;
  
  local_20 = *(int **)(this + 0x13e0);
  if (local_20 == (int *)0x0) {
    iVar2 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar2 == 0) {
      local_20 = *(int **)(this + 0x13e0);
    }
    else {
      LockStudioHdr(this);
      local_20 = *(int **)(this + 0x13e0);
    }
    if (local_20 == (int *)0x0) goto LAB_005e70c2;
  }
  if (*local_20 != 0) {
    *param_2 = -1;
    *param_3 = -1;
    iVar2 = *local_20;
    if (*(int *)(iVar2 + 0xac) < 1) {
      return 0;
    }
    iVar5 = *(int *)(iVar2 + 0xb0);
    local_28 = 0;
    do {
      iVar6 = local_28 * 0xc + iVar5;
      for (iVar4 = 0; (iVar3 = iVar2 + iVar6, iVar3 != 0 && (iVar4 < *(int *)(iVar3 + 4)));
          iVar4 = iVar4 + 1) {
        iVar3 = iVar3 + iVar4 * 0x44 + *(int *)(iVar3 + 8);
        if (iVar3 != 0) {
          pcVar1 = (char *)(iVar3 + *(int *)(iVar3 + 0x20));
          if (*(int *)(iVar3 + 0x20) == 0) {
            pcVar1 = "";
          }
          iVar2 = _V_stricmp(pcVar1,param_1);
          if (iVar2 == 0) {
            *param_2 = local_28;
            *param_3 = iVar4;
            return 1;
          }
          iVar2 = *local_20;
          iVar5 = *(int *)(iVar2 + 0xb0);
          iVar6 = local_28 * 0xc + iVar5;
        }
      }
      local_28 = local_28 + 1;
      if (*(int *)(iVar2 + 0xac) <= local_28) {
        return 0;
      }
    } while( true );
  }
LAB_005e70c2:
  *param_2 = -1;
  *param_3 = -1;
  return 0;
}

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)