L L4D2node

InfoChangelevel::DrawDebugTextOverlays

0x00864a90 · 362 bytes · __thiscall

_ZN15InfoChangelevel21DrawDebugTextOverlaysEv

Decompiled

undefined (1 param)

/* InfoChangelevel::DrawDebugTextOverlays() */

int __thiscall InfoChangelevel::DrawDebugTextOverlays(InfoChangelevel *this)

{
  uint uVar1;
  CBaseEntity *this_00;
  undefined4 uVar2;
  char *pcVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  int local_b0;
  undefined **local_ac;
  undefined1 local_a8;
  undefined1 local_a7;
  undefined4 local_24;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_b0 = CBaseTrigger::DrawDebugTextOverlays((CBaseTrigger *)this);
  if (((byte)this[0x110] & 1) != 0) {
    local_a8 = 1;
    local_ac = &PTR_InitQuietTruncation_00c50f80;
    local_a7 = 0;
    local_24 = 0;
    if (0 < *(int *)(this + 0x560)) {
      iVar6 = 0;
      do {
        while( true ) {
          uVar1 = *(uint *)(*(int *)(this + 0x554) + iVar6 * 4);
          if ((((uVar1 == 0xffffffff) ||
               (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc))
              || (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
             (this_00 = *(CBaseEntity **)(puVar4 + 4), this_00 == (CBaseEntity *)0x0)) break;
          uVar2 = CBaseEntity::GetDebugName(this_00);
          if (*(int *)(this_00 + 0x30) == 0) {
            iVar5 = 0;
          }
          else {
            iVar5 = *(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
          }
          iVar6 = iVar6 + 1;
          pcVar3 = (char *)CFmtStrN<128>::sprintf
                                     ((CFmtStrN<128> *)&local_ac,"Touching: %d(%s)\n",iVar5,uVar2);
          iVar5 = local_b0 + 1;
          CBaseEntity::EntityText((CBaseEntity *)this,local_b0,pcVar3,0.0,0,0xff,0x40,0xff);
          local_b0 = iVar5;
          if (*(int *)(this + 0x560) <= iVar6) goto LAB_00864bd9;
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 < *(int *)(this + 0x560));
    }
  }
LAB_00864bd9:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_b0;
  }
                    /* 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)