L L4D2node

CPhysLength::DrawDebugGeometryOverlays

0x00776410 · 577 bytes · __thiscall

_ZN11CPhysLength25DrawDebugGeometryOverlaysEv

Decompiled

undefined (1 param)

/* CPhysLength::DrawDebugGeometryOverlays() */

void __thiscall CPhysLength::DrawDebugGeometryOverlays(CPhysLength *this)

{
  float fVar1;
  int *piVar2;
  longdouble lVar3;
  float local_70;
  float local_6c;
  float local_68;
  float local_64;
  float local_60;
  float local_5c;
  float local_58;
  float local_54;
  float local_50;
  float local_4c;
  float local_48;
  float local_44;
  
  if (((byte)this[0x110] & 0x2c) != 0) {
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    local_70 = *(float *)(this + 0x2e0);
    local_6c = *(float *)(this + 0x2e4);
    local_68 = *(float *)(this + 0x2e8);
    local_64 = local_70;
    local_60 = local_6c;
    local_5c = local_68;
    piVar2 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
    if (piVar2 != (int *)0x0) {
      (**(code **)(*piVar2 + 200))(piVar2,(matrix3x4_t *)&local_4c);
      VectorTransform((float *)(this + 0x47c),(matrix3x4_t *)&local_4c,&local_70);
    }
    piVar2 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
    if (piVar2 != (int *)0x0) {
      (**(code **)(*piVar2 + 200))(piVar2,(matrix3x4_t *)&local_4c);
      VectorTransform((float *)(this + 0x488),(matrix3x4_t *)&local_4c,&local_64);
    }
    local_58 = local_64 - local_70;
    local_54 = local_60 - local_6c;
    local_50 = local_5c - local_68;
    lVar3 = (longdouble)VectorNormalize((Vector *)&local_58);
    fVar1 = *(float *)(this + 0x4a8);
    if (fVar1 < (float)lVar3) {
      local_48 = local_54 * fVar1 + local_6c;
      local_44 = local_50 * fVar1 + local_68;
      local_4c = fVar1 * local_58 + local_70;
      NDebugOverlay::Line((Vector *)&local_70,(Vector *)&local_4c,0,0xff,0,false,0.0);
      NDebugOverlay::Line((Vector *)&local_4c,(Vector *)&local_64,0xff,0,0,false,0.0);
    }
    else {
      NDebugOverlay::Line((Vector *)&local_70,(Vector *)&local_64,0,0xff,0,false,0.0);
    }
    if (((byte)this[0x110] & 0x2c) != 0) {
      DrawConstraintObjectsAxes((CBaseEntity *)this,*(IPhysicsConstraint **)(this + 0x440));
    }
  }
  CBaseEntity::DrawDebugGeometryOverlays((CBaseEntity *)this);
  return;
}

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)