L L4D2node

CPhysConstraint::DrawDebugTextOverlays

0x007774b0 · 343 bytes · __thiscall

_ZN15CPhysConstraint21DrawDebugTextOverlaysEv

Decompiled

undefined (1 param)

/* CPhysConstraint::DrawDebugTextOverlays() */

int __thiscall CPhysConstraint::DrawDebugTextOverlays(CPhysConstraint *this)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_144 [12];
  float local_138;
  float local_134;
  CFmtStrN<256> local_12c [5];
  char local_127 [263];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = CBaseEntity::DrawDebugTextOverlays((CBaseEntity *)this);
  if ((*(int *)(this + 0x440) != 0) && (((byte)this[0x110] & 1) != 0)) {
    _V_memset(local_144,0,0x18);
    (**(code **)(**(int **)(this + 0x440) + 0x30))(*(int **)(this + 0x440),local_144);
    if (((local_138 != 1.0) && (local_138 != 0.0)) || ((local_134 != 1.0 && (local_134 != 0.0)))) {
      CFmtStrN<256>::CFmtStrN
                (local_12c,"mass ratio %.4f:%.4f\n",(double)local_138,(double)local_134);
      if (((byte)this[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      }
      NDebugOverlay::EntityTextAtPosition
                ((Vector *)(this + 0x2e0),iVar1,local_127,0.0,0xff,0xff,0,0xff);
    }
    iVar1 = iVar1 + 1;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar1;
}

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)