L L4D2node

DrawAllDebugOverlays

0x006c9b00 · 601 bytes · unknown

_Z20DrawAllDebugOverlaysv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* DrawAllDebugOverlays() */

void DrawAllDebugOverlays(void)

{
  int *piVar1;
  int *piVar2;
  int *piVar3;
  int iVar4;
  code *pcVar5;
  float *pfVar6;
  float fVar7;
  CBasePlayer *pCVar8;
  CBaseEntity *this;
  undefined1 *puVar9;
  float *pfVar10;
  float *pfVar11;
  int in_GS_OFFSET;
  longdouble lVar12;
  longdouble lVar13;
  float afStack_274 [2];
  undefined1 *local_230 [4];
  undefined1 local_220 [512];
  int local_20;
  
  pfVar11 = (float *)&stack0xfffffd94;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  NDebugOverlay::PurgeTextOverlays();
  if (((CBaseEntity::m_bInDebugSelect != '\0') &&
      (pCVar8 = (CBasePlayer *)UTIL_PlayerByIndex(CBaseEntity::m_nDebugPlayer),
      pCVar8 != (CBasePlayer *)0x0)) &&
     (this = (CBaseEntity *)FindPickerEntity(pCVar8), this != (CBaseEntity *)0x0)) {
    (**(code **)(*(int *)this + 0xc0))();
    CBaseEntity::DrawBBoxOverlay(this,0.0);
    CBaseEntity::SendDebugPivotOverlay(this);
  }
  UTIL_DrawOverlayLines();
  piVar2 = (int *)gEntList._65540_4_;
  piVar3 = mdlcache;
  if (*(int *)(*(int *)(g_pDeveloper + 0x1c) + 0x30) != 0) {
    for (; mdlcache = piVar3, piVar2 != (int *)0x0; piVar2 = (int *)piVar2[3]) {
      piVar1 = (int *)*piVar2;
      if ((piVar1[0x44] != 0) || (piVar1[0x45] != 0)) {
        (**(code **)(*piVar3 + 0x68))();
                    /* try { // try from 006c9b79 to 006c9b7e has its CatchHandler @ 006c9d57 */
        (**(code **)(*piVar1 + 0xbc))();
        (**(code **)(*piVar3 + 0x6c))();
      }
      piVar3 = mdlcache;
    }
  }
  pfVar6 = (float *)gEntList._65540_4_;
  pfVar10 = (float *)&stack0xfffffd94;
  if (*(int *)(sv_massreport._28_4_ + 0x30) != 0) {
    for (; pfVar11 = pfVar10, pfVar6 != (float *)0x0; pfVar6 = (float *)pfVar6[3]) {
      piVar2 = (int *)*pfVar6;
      piVar3 = (int *)piVar2[0x8e];
      pfVar10 = pfVar11;
      if (piVar3 != (int *)0x0) {
        iVar4 = *piVar3;
        *pfVar11 = (float)piVar3;
        pcVar5 = *(code **)(iVar4 + 0x78);
        pfVar11[-1] = 9.974117e-39;
        lVar12 = (longdouble)(*pcVar5)();
        *pfVar11 = (float)lVar12;
        pfVar11[-1] = 9.974151e-39;
        fVar7 = (float)GetMassEquivalent(*pfVar11);
        iVar4 = *(int *)piVar2[0x8e];
        *pfVar11 = (float)piVar2[0x8e];
        pcVar5 = *(code **)(iVar4 + 0x78);
        pfVar11[-1] = 9.974173e-39;
        lVar12 = (longdouble)(*pcVar5)();
        iVar4 = *(int *)piVar2[0x8e];
        *pfVar11 = (float)piVar2[0x8e];
        pcVar5 = *(code **)(iVar4 + 0x78);
        pfVar11[-1] = 9.974243e-39;
        lVar13 = (longdouble)(*pcVar5)();
        iVar4 = *piVar2;
        *pfVar11 = (float)local_230;
        pfVar11[1] = (float)piVar2;
        pcVar5 = *(code **)(iVar4 + 0x20);
        pfVar11[-1] = 9.974308e-39;
        (*pcVar5)();
        pfVar10 = pfVar11 + -1;
        pfVar11[7] = fVar7;
        *(double *)(pfVar11 + 5) = (double)((float)lVar12 * 2.2);
        *(double *)(pfVar11 + 3) = (double)(float)lVar13;
        puVar9 = &DAT_00d539c2;
        if (local_230[0] != (undefined1 *)0x0) {
          puVar9 = local_230[0];
        }
        pfVar11[1] = (float)"%s: Mass: %.2f kg / %.2f lb (%s)";
        *pfVar11 = 7.17465e-43;
        pfVar11[2] = (float)puVar9;
        pfVar11[-1] = (float)local_220;
        pfVar11[-2] = 9.974427e-39;
        V_snprintf((char *)pfVar11[-1],(int)*pfVar11,(char *)pfVar11[1]);
        pfVar11[6] = 3.57331e-43;
        pfVar11[5] = 3.57331e-43;
        pfVar11[4] = 3.57331e-43;
        pfVar11[3] = 3.57331e-43;
        pfVar11[2] = 0.0;
        pfVar11[1] = (float)local_220;
        *pfVar11 = 0.0;
        pfVar11[-1] = (float)piVar2;
        pfVar11[-2] = 9.974511e-39;
        CBaseEntity::EntityText
                  ((CBaseEntity *)pfVar11[-1],(int)*pfVar11,(char *)pfVar11[1],pfVar11[2],
                   (int)pfVar11[3],(int)pfVar11[4],(int)pfVar11[5],(int)pfVar11[6]);
      }
    }
  }
  pfVar11[-1] = 9.974534e-39;
  DrawMessageEntities();
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    pfVar11[-1] = (float)&UNK_006c9d6e;
    __stack_chk_fail();
  }
  return;
}

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)