L L4D2node

CBaseEntity::DrawTimedOverlays

0x00607d60 · 533 bytes · __thiscall

_ZN11CBaseEntity17DrawTimedOverlaysEv

Decompiled

undefined (1 param)

/* CBaseEntity::DrawTimedOverlays() */

void __thiscall CBaseEntity::DrawTimedOverlays(CBaseEntity *this)

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  int iVar8;
  int in_GS_OFFSET;
  char local_220 [512];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (((byte)this[0x110] & 0x10) != 0) {
    uVar3 = GetDebugName(this);
    V_snprintf(local_220,0x200,"[%s]",uVar3);
    EntityText(this,0,local_220,0.0,0xff,0xff,0xff,0xff);
  }
  iVar8 = 1;
  puVar6 = *(undefined4 **)(this + 0x114);
  puVar1 = (undefined4 *)0x0;
  if (puVar6 != (undefined4 *)0x0) {
    puVar7 = (undefined4 *)puVar6[3];
    if (m_bDebugPause == '\0') goto LAB_00607e07;
LAB_00607db8:
    if (iVar8 < 0xb) {
      iVar2 = 0xff;
      iVar5 = 0xcd;
      iVar4 = 0xff;
      goto LAB_00607e5e;
    }
    do {
      if (puVar1 == (undefined4 *)0x0) {
        *(undefined4 **)(this + 0x114) = puVar7;
      }
      else {
        puVar1[3] = puVar7;
      }
      ::operator_delete((void *)*puVar6);
      ::operator_delete(puVar6);
      puVar6 = puVar7;
      while( true ) {
        if (puVar6 == (undefined4 *)0x0) goto LAB_00607e9b;
        puVar7 = (undefined4 *)puVar6[3];
        if (m_bDebugPause != '\0') goto LAB_00607db8;
LAB_00607e07:
        if (((float)(int)puVar6[1] < *(float *)(gpGlobals + 0xc)) || (10 < iVar8)) break;
        iVar2 = 0xff;
        iVar4 = (int)(((*(float *)(gpGlobals + 0xc) - (float)(int)puVar6[2]) /
                      (float)(int)(puVar6[1] - puVar6[2])) * 255.0);
        if (iVar4 < 0x32) {
          if (iVar4 < 0) {
            iVar5 = 0xcd;
            iVar4 = 0xff;
          }
          else {
            iVar2 = 0xff - iVar4;
            iVar4 = 0xff;
            iVar5 = 0xcd;
          }
        }
        else {
          iVar2 = 0xff - iVar4;
          iVar4 = 0xb9;
          iVar5 = 0x91;
        }
LAB_00607e5e:
        EntityText(this,iVar8,(char *)*puVar6,0.0,iVar4,iVar5,iVar5,iVar2);
        puVar1 = puVar6;
        puVar6 = puVar7;
        iVar8 = iVar8 + 1;
      }
    } while( true );
  }
LAB_00607e9b:
  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)