L L4D2node

CPhysBox::DrawDebugTextOverlays

0x0079c2d0 · 308 bytes · __thiscall

_ZN8CPhysBox21DrawDebugTextOverlaysEv

Decompiled

undefined (1 param)

/* CPhysBox::DrawDebugTextOverlays() */

int __thiscall CPhysBox::DrawDebugTextOverlays(CPhysBox *this)

{
  int *piVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int in_GS_OFFSET;
  longdouble lVar5;
  longdouble lVar6;
  char local_220 [512];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = CBreakable::DrawDebugTextOverlays((CBreakable *)this);
  iVar4 = iVar2;
  if ((((byte)this[0x110] & 1) != 0) && (piVar1 = *(int **)(this + 0x238), piVar1 != (int *)0x0)) {
    lVar5 = (longdouble)(**(code **)(*piVar1 + 0x78))(piVar1);
    uVar3 = GetMassEquivalent((float)lVar5);
    lVar5 = (longdouble)(**(code **)(**(int **)(this + 0x238) + 0x78))(*(int **)(this + 0x238));
    lVar6 = (longdouble)(**(code **)(**(int **)(this + 0x238) + 0x78))(*(int **)(this + 0x238));
    V_snprintf(local_220,0x200,"Mass: %.2f kg / %.2f lb (%s)",(double)(float)lVar6,
               (double)((float)lVar5 * 2.2),uVar3);
    iVar4 = iVar2 + 1;
    CBaseEntity::EntityText((CBaseEntity *)this,iVar2,local_220,0.0,0xff,0xff,0xff,0xff);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* 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)