L L4D2node

Infected::ReportAnimationState

0x00a12180 · 518 bytes · __thiscall

_ZN8Infected20ReportAnimationStateEP11CBasePlayer

Decompiled

undefined (2 params)

/* Infected::ReportAnimationState(CBasePlayer*) */

void __thiscall Infected::ReportAnimationState(Infected *this,CBasePlayer *param_1)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  int in_GS_OFFSET;
  undefined **local_12c;
  undefined1 local_128;
  undefined1 local_127;
  undefined4 local_24;
  int local_20;
  
  piVar2 = mdlcache;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  (**(code **)(*mdlcache + 0x68))(mdlcache);
  piVar3 = *(int **)(this + 0x13e0);
  if (piVar3 == (int *)0x0) {
                    /* try { // try from 00a12352 to 00a12362 has its CatchHandler @ 00a12386 */
    iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar4 != 0) {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
    }
    piVar3 = *(int **)(this + 0x13e0);
    if (piVar3 != (int *)0x0) goto LAB_00a121c6;
  }
  else {
LAB_00a121c6:
    if (*piVar3 != 0) {
      local_12c = &PTR_InitQuietTruncation_00c08ee8;
      local_128 = 1;
      local_127 = 0;
      local_24 = 0;
      iVar4 = 0;
      if (*(int *)(this + 0x30) != 0) {
        iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
      }
                    /* try { // try from 00a12238 to 00a1231a has its CatchHandler @ 00a12386 */
      uVar5 = CFmtStrN<256>::sprintf
                        ((CFmtStrN<256> *)&local_12c,"%f: Infected %d(%s): main sequence is %d\n",
                         (double)*(float *)(gpGlobals + 0xc),iVar4,*piVar3 + 0xc,
                         *(undefined4 *)(this + 0x494));
      UTIL_MessageText(param_1,uVar5,0);
      if (0 < *(int *)(this + 0x1d20)) {
        iVar4 = 0;
        do {
          iVar1 = *(int *)(*(int *)(this + 0x1d14) + 4 + iVar4 * 0x18);
          iVar6 = CBaseAnimating::GetSequenceActivity((CBaseAnimating *)this,iVar1);
          uVar5 = CAI_BaseNPC::GetActivityName(iVar6);
          iVar6 = iVar4 * 0x18 + *(int *)(this + 0x1d14);
          uVar5 = CFmtStrN<256>::sprintf
                            ((CFmtStrN<256> *)&local_12c,
                             "layer %d: sequence %d(%s), start time %f, order %d, looping %d\n",
                             iVar4,iVar1,uVar5,(double)*(float *)(iVar6 + 8),
                             *(undefined4 *)(iVar6 + 0xc),(uint)*(byte *)(iVar6 + 0x10));
          UTIL_MessageText(param_1,uVar5,0);
          iVar4 = iVar4 + 1;
        } while (iVar4 < *(int *)(this + 0x1d20));
      }
      (**(code **)(*piVar2 + 0x6c))(piVar2);
      goto LAB_00a12338;
    }
  }
  (**(code **)(*piVar2 + 0x6c))(piVar2);
LAB_00a12338:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)