L L4D2node

CFourWheelVehiclePhysics::DrawDebugGeometryOverlays

0x006adac0 · 1863 bytes · __thiscall

_ZN24CFourWheelVehiclePhysics25DrawDebugGeometryOverlaysEv

Decompiled

undefined (1 param)

/* CFourWheelVehiclePhysics::DrawDebugGeometryOverlays() */

void __thiscall CFourWheelVehiclePhysics::DrawDebugGeometryOverlays(CFourWheelVehiclePhysics *this)

{
  float fVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  float fVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  uint uVar7;
  int *piVar8;
  IPhysicsObject *pIVar9;
  int iVar10;
  undefined *puVar11;
  float *pfVar12;
  Vector *pVVar13;
  float *pfVar14;
  int iVar15;
  longdouble lVar16;
  Vector local_2d4 [12];
  QAngle local_2c8 [12];
  float local_2bc;
  float local_2b8;
  float local_2b4;
  float local_2b0;
  float local_2ac;
  float local_2a8;
  float local_2a4;
  float local_2a0;
  float local_29c;
  undefined4 local_298;
  undefined4 local_294;
  undefined4 local_290;
  undefined4 local_28c;
  undefined4 local_288;
  undefined4 local_284;
  float local_280;
  undefined4 local_27c;
  undefined4 local_278;
  float local_274;
  undefined4 local_270;
  undefined4 local_26c;
  Vector local_268 [12];
  Vector local_25c [12];
  undefined4 local_250;
  undefined4 local_24c;
  undefined4 local_248;
  undefined4 local_220;
  undefined4 local_21c;
  undefined4 local_218;
  float local_17c [60];
  float local_8c [31];
  
  if (0 < *(int *)(this + 0x60)) {
    iVar10 = 0;
    pVVar13 = (Vector *)(this + 100);
    do {
      piVar8 = (int *)(**(code **)(**(int **)(this + 0x24) + 0x20))(*(int **)(this + 0x24),iVar10);
      lVar16 = (longdouble)(**(code **)(*piVar8 + 0xac))(piVar8);
      (**(code **)(*piVar8 + 0xc4))(piVar8,(Vector *)&local_250,(QAngle *)&local_220);
      NDebugOverlay::Sphere
                ((Vector *)&local_250,(QAngle *)&local_220,(float)lVar16,0,0xff,0,0,false,0.0);
      NDebugOverlay::Sphere
                (pVVar13,(QAngle *)(pVVar13 + 0x30),(float)lVar16,0xff,0xff,0,0,false,0.0);
      iVar10 = iVar10 + 1;
      pVVar13 = pVVar13 + 0xc;
    } while (iVar10 < *(int *)(this + 0x60));
  }
  iVar10 = 0;
  uVar7 = *(uint *)(this + 4);
  if (((uVar7 != 0xffffffff) &&
      (puVar11 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar11 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar11 + 8) == uVar7 >> 0xc)) {
    iVar10 = *(int *)(puVar11 + 4);
  }
  piVar8 = *(int **)(iVar10 + 0x238);
  if (piVar8 != (int *)0x0) {
    iVar10 = (**(code **)(**(int **)(this + 0x24) + 0x10))(*(int **)(this + 0x24));
    fVar1 = *(float *)(iVar10 + 0x30);
    uVar2 = *(undefined4 *)(iVar10 + 0x34);
    uVar3 = *(undefined4 *)(iVar10 + 0x38);
    fVar4 = *(float *)(iVar10 + 0xa4);
    uVar5 = *(undefined4 *)(iVar10 + 0xa8);
    uVar6 = *(undefined4 *)(iVar10 + 0xac);
    (**(code **)(*piVar8 + 0xc4))(piVar8,local_2d4,local_2c8);
    local_220 = 0x40a00000;
    local_21c = 0x40a00000;
    local_218 = 0x40a00000;
    local_250 = 0xc0a00000;
    local_24c = 0xc0a00000;
    local_248 = 0xc0a00000;
    NDebugOverlay::BoxAngles
              (local_2d4,(Vector *)&local_250,(Vector *)&local_220,local_2c8,0xff,0,0,0,0.0);
    AngleMatrix(local_2c8,local_2d4,(matrix3x4_t *)&local_250);
    local_280 = fVar1;
    local_27c = uVar2;
    local_278 = uVar3;
    local_274 = fVar4;
    local_270 = uVar5;
    local_26c = uVar6;
    VectorTransform(&local_280,(matrix3x4_t *)&local_250,(float *)local_268);
    VectorTransform(&local_274,(matrix3x4_t *)&local_250,(float *)local_25c);
    local_220 = 0x40400000;
    local_21c = 0x40400000;
    local_218 = 0x40400000;
    local_28c = 0xc0400000;
    local_288 = 0xc0400000;
    local_284 = 0xc0400000;
    NDebugOverlay::BoxAngles
              (local_268,(Vector *)&local_28c,(Vector *)&local_220,local_2c8,0,0xff,0,0,0.0);
    pfVar12 = local_8c;
    local_220 = 0x40400000;
    local_21c = 0x40400000;
    local_218 = 0x40400000;
    local_28c = 0xc0400000;
    local_288 = 0xc0400000;
    local_284 = 0xc0400000;
    NDebugOverlay::BoxAngles
              (local_25c,(Vector *)&local_28c,(Vector *)&local_220,local_2c8,0,0xff,0,0,0.0);
    (**(code **)(**(int **)(this + 0x24) + 0x40))(*(int **)(this + 0x24),(Vector *)&local_220);
    pfVar14 = local_17c;
    iVar10 = 0;
    do {
      local_2b8 = *pfVar14 * 39.37008;
      local_28c = 0x3f800000;
      local_288 = 0x3f800000;
      local_284 = 0x3f800000;
      local_2b4 = -(pfVar14[-1] * 39.37008);
      local_298 = 0xbf800000;
      local_2bc = pfVar14[-2] * 39.37008;
      local_294 = 0xbf800000;
      local_2ac = pfVar14[3] * 39.37008;
      local_290 = 0xbf800000;
      local_2a0 = *pfVar12 * 39.37008;
      local_2a8 = -(pfVar14[2] * 39.37008);
      local_2b0 = pfVar14[1] * 39.37008;
      local_29c = -(pfVar12[-1] * 39.37008);
      local_2a4 = pfVar12[-2] * 39.37008;
      NDebugOverlay::BoxAngles
                ((Vector *)&local_2bc,(Vector *)&local_298,(Vector *)&local_28c,local_2c8,0,0xff,0,0
                 ,0.0);
      NDebugOverlay::Line((Vector *)&local_2bc,(Vector *)&local_2b0,0xff,0xff,0,true,0.0);
      local_28c = 0x3f800000;
      local_288 = 0x3f800000;
      local_284 = 0x3f800000;
      local_298 = 0xbf800000;
      local_294 = 0xbf800000;
      local_290 = 0xbf800000;
      NDebugOverlay::BoxAngles
                ((Vector *)&local_2b0,(Vector *)&local_298,(Vector *)&local_28c,local_2c8,0xff,0,0,0
                 ,0.0);
      local_28c = 0x3f000000;
      local_288 = 0x3f000000;
      local_284 = 0x3f000000;
      local_298 = 0xbf000000;
      local_294 = 0xbf000000;
      local_290 = 0xbf000000;
      NDebugOverlay::BoxAngles
                ((Vector *)&local_2a4,(Vector *)&local_298,(Vector *)&local_28c,local_2c8,0,0,0xff,0
                 ,0.0);
      iVar15 = iVar10 + 1;
      pIVar9 = (IPhysicsObject *)
               (**(code **)(**(int **)(this + 0x24) + 0x20))(*(int **)(this + 0x24),iVar10);
      DebugDrawContactPoints(pIVar9);
      pfVar12 = pfVar12 + 3;
      pfVar14 = pfVar14 + 6;
      iVar10 = iVar15;
    } while (iVar15 != 4);
  }
  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)