L L4D2node

CTriggerMultiple::DrawDebugTextOverlays

0x00b1e370 · 784 bytes · __thiscall

_ZN16CTriggerMultiple21DrawDebugTextOverlaysEv

Decompiled

undefined (1 param)

/* CTriggerMultiple::DrawDebugTextOverlays() */

int __thiscall CTriggerMultiple::DrawDebugTextOverlays(CTriggerMultiple *this)

{
  uint uVar1;
  CBaseEntity *this_00;
  char *pcVar2;
  undefined4 uVar3;
  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) && (*(int *)(this + 0x588) != 0)) {
    local_ac = &PTR_InitQuietTruncation_00c50f80;
    local_a8 = 1;
    local_a7 = 0;
    local_24 = 0;
    pcVar2 = (char *)CFmtStrN<128>::sprintf
                               ((CFmtStrN<128> *)&local_ac,"Team %d",*(int *)(this + 0x588));
    CBaseEntity::EntityText((CBaseEntity *)this,local_b0,pcVar2,0.0,0xff,0xff,0xff,0xff);
    pcVar2 = (char *)CFmtStrN<128>::sprintf
                               ((CFmtStrN<128> *)&local_ac,"Allow incaps: %d",
                                (uint)(byte)this[0x58c]);
    CBaseEntity::EntityText((CBaseEntity *)this,local_b0 + 1,pcVar2,0.0,0xff,0xff,0xff,0xff);
    pcVar2 = (char *)CFmtStrN<128>::sprintf
                               ((CFmtStrN<128> *)&local_ac,"Allow ghosts: %d",
                                (uint)(byte)this[0x58d]);
    CBaseEntity::EntityText((CBaseEntity *)this,local_b0 + 2,pcVar2,0.0,0xff,0xff,0xff,0xff);
    if (this[0x584] == (CTriggerMultiple)0x0) {
      CBaseEntity::EntityText
                ((CBaseEntity *)this,local_b0 + 3,"Entire team not touching",0.0,0xff,0,0,0xff);
    }
    else {
      CBaseEntity::EntityText
                ((CBaseEntity *)this,local_b0 + 3,"Entire team touching",0.0,0xff,0xff,0xff,0xff);
    }
    local_b0 = local_b0 + 4;
    if (0 < *(int *)(this + 0x560)) {
      iVar6 = 0;
      do {
        while ((((uVar1 = *(uint *)(*(int *)(this + 0x554) + iVar6 * 4), 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))) {
          uVar3 = 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;
          pcVar2 = (char *)CFmtStrN<128>::sprintf
                                     ((CFmtStrN<128> *)&local_ac,"Touching: %d(%s)\n",iVar5,uVar3);
          iVar5 = local_b0 + 1;
          CBaseEntity::EntityText((CBaseEntity *)this,local_b0,pcVar2,0.0,0,0xff,0x40,0xff);
          local_b0 = iVar5;
          if (*(int *)(this + 0x560) <= iVar6) goto LAB_00b1e3a7;
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 < *(int *)(this + 0x560));
    }
  }
LAB_00b1e3a7:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return local_b0;
}

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)