L L4D2node

Infected::DrawDebugTextOverlays

0x00a0c620 · 1083 bytes · __thiscall

_ZN8Infected21DrawDebugTextOverlaysEv

Decompiled

undefined (1 param)

/* Infected::DrawDebugTextOverlays() */

int __thiscall Infected::DrawDebugTextOverlays(Infected *this)

{
  float fVar1;
  float fVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  int iVar7;
  int iVar8;
  int in_GS_OFFSET;
  longdouble lVar9;
  longdouble lVar10;
  double dVar11;
  char local_820 [1024];
  char local_420 [1024];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = CBaseAnimating::DrawDebugTextOverlays((CBaseAnimating *)this);
  lVar9 = (longdouble)CBaseAnimating::GetPoseParameter((CBaseAnimating *)this,"move_y");
  lVar10 = (longdouble)CBaseAnimating::GetPoseParameter((CBaseAnimating *)this,"move_x");
  V_snprintf(local_820,0x400,"move_x: %3.2f   move_y: %3.2f",(double)(float)lVar10,
             SUB84((double)(float)lVar9,0),(int)((ulonglong)(double)(float)lVar9 >> 0x20));
  CBaseEntity::EntityText((CBaseEntity *)this,iVar3,local_820,0.0,0xff,0xff,0xff,0xff);
  V_snprintf(local_820,0x400,"color: %d %d %d %d",(uint)(byte)this[0x124],(uint)(byte)this[0x125],
             (uint)(byte)this[0x126],(uint)(byte)this[0x127]);
  iVar7 = iVar3 + 2;
  CBaseEntity::EntityText((CBaseEntity *)this,iVar3 + 1,local_820,0.0,0xff,0xff,0xff,0xff);
  if (((byte)this[0x110] & 1) != 0) {
    if (0 < *(int *)(this + 0x1400)) {
      iVar8 = 0;
      iVar3 = iVar7;
      do {
        iVar4 = CBaseAnimatingOverlay::GetAnimOverlay((CBaseAnimatingOverlay *)this,iVar8);
        fVar1 = *(float *)(iVar4 + 0x14);
        iVar7 = iVar3;
        if (0.0 < fVar1) {
          uVar6 = *(undefined4 *)(iVar4 + 0x3c);
          fVar2 = *(float *)(iVar4 + 0xc);
          uVar5 = CBaseAnimating::GetSequenceActivityName
                            ((CBaseAnimating *)this,*(int *)(iVar4 + 8));
          dVar11 = (double)fVar1;
          V_snprintf(local_420,0x400,"Layer %d (%s): order %d weight %f cycle %f",iVar8,uVar5,uVar6,
                     SUB84(dVar11,0),(int)((ulonglong)dVar11 >> 0x20),(double)fVar2);
          iVar7 = iVar3 + 1;
          CBaseEntity::EntityText((CBaseEntity *)this,iVar3,local_420,0.0,0xff,0xff,0xff,0xff);
        }
        iVar8 = iVar8 + 1;
        iVar3 = iVar7;
      } while (iVar8 < *(int *)(this + 0x1400));
    }
    iVar3 = iVar7;
    if (*(int *)(this + 0x1cf4) != -1) {
      uVar6 = CBaseEntity::GetGender((CBaseEntity *)this);
      GetDamageCutoutInfoArray(uVar6);
      V_snprintf(local_820,0x400,"Wound 1: %d (%s)",*(undefined4 *)(this + 0x1cf4));
      iVar3 = iVar7 + 1;
      CBaseEntity::EntityText((CBaseEntity *)this,iVar7,local_820,0.0,0xff,0xff,0xff,0xff);
    }
    iVar7 = iVar3;
    if (*(int *)(this + 0x1cf8) != -1) {
      uVar6 = CBaseEntity::GetGender((CBaseEntity *)this);
      GetDamageCutoutInfoArray(uVar6);
      V_snprintf(local_820,0x400,"Wound 2: %d (%s)",*(undefined4 *)(this + 0x1cf8));
      iVar7 = iVar3 + 1;
      CBaseEntity::EntityText((CBaseEntity *)this,iVar3,local_820,0.0,0xff,0xff,0xff,0xff);
    }
  }
  (**(code **)(*(int *)this + 0x1fc))(this);
  V_snprintf(local_820,0x400,"health: %d / %d",*(undefined4 *)(this + 0x100));
  CBaseEntity::EntityText((CBaseEntity *)this,iVar7,local_820,0.0,0xff,0xff,0xff,0xff);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar7 + 1;
  }
                    /* 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)