L L4D2node

Path::Draw

0x00762130 · 959 bytes · __thiscall

_ZNK4Path4DrawEPKNS_7SegmentE.part.40

Decompiled

undefined (2 params)

/* Path::Draw(Path::Segment const*) const [clone .part.40] */

void __thiscall Path::Draw(Path *this,Segment *param_1)

{
  float fVar1;
  int *in_EAX;
  int iVar2;
  uint uVar3;
  int iVar4;
  char *pcVar5;
  int in_EDX;
  int iVar6;
  int iVar7;
  Vector *pVVar8;
  int in_GS_OFFSET;
  float fVar9;
  float fVar10;
  int local_144;
  int local_140;
  float local_138;
  float local_134;
  float local_130;
  undefined **local_12c;
  undefined1 local_128;
  undefined1 local_127;
  undefined4 local_24;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_128 = 1;
  local_12c = &PTR_InitQuietTruncation_00c08ee8;
  local_127 = 0;
  local_24 = 0;
  if ((in_EDX != 0) || (in_EDX = (**(code **)(*in_EAX + 0x54))(), in_EDX != 0)) {
    iVar6 = 0;
    do {
      iVar2 = (**(code **)(*in_EAX + 0x58))(in_EAX,in_EDX);
      if (iVar2 == 0) break;
      fVar9 = ABS(*(float *)(iVar2 + 0xc) - *(float *)(in_EDX + 0xc));
      fVar10 = ABS(*(float *)(iVar2 + 8) - *(float *)(in_EDX + 8));
      if (fVar9 <= fVar10) {
        fVar9 = fVar10;
      }
      fVar10 = *(float *)(iVar2 + 0x10);
      fVar1 = *(float *)(in_EDX + 0x10);
      uVar3 = *(int *)(in_EDX + 0x18) - 1;
      if (uVar3 < 5) {
        local_140 = *(int *)(CSWTCH_1701 + uVar3 * 4);
        local_144 = *(int *)(CSWTCH_1702 + uVar3 * 4);
        iVar7 = *(int *)(CSWTCH_1703 + uVar3 * 4);
        iVar4 = *(int *)(in_EDX + 0x14);
        if (iVar4 == 0) goto LAB_00762461;
LAB_0076221a:
        NDebugOverlay::VertArrow
                  ((Vector *)(iVar4 + 0x10),(Vector *)(iVar4 + 4),5.0,local_140,local_144,iVar7,0xff
                   ,true,0.1);
      }
      else {
        local_144 = 0x4d;
        iVar4 = *(int *)(in_EDX + 0x14);
        iVar7 = 0;
        local_140 = 0xff;
        if (iVar4 != 0) goto LAB_0076221a;
LAB_00762461:
        NDebugOverlay::Line((Vector *)(in_EDX + 8),(Vector *)(iVar2 + 8),local_140,local_144,iVar7,
                            true,0.1);
      }
      pVVar8 = (Vector *)(in_EDX + 8);
      if (fVar9 <= ABS(fVar10 - fVar1)) {
        local_138 = *(float *)(in_EDX + 0x1c) * 25.0 + *(float *)(in_EDX + 8);
        local_134 = *(float *)(in_EDX + 0x20) * 25.0 + *(float *)(in_EDX + 0xc);
        local_130 = *(float *)(in_EDX + 0x24) * 25.0 + *(float *)(in_EDX + 0x10);
        NDebugOverlay::VertArrow
                  (pVVar8,(Vector *)&local_138,5.0,local_140,local_144,iVar7,0xff,true,0.1);
      }
      else {
        local_138 = *(float *)(in_EDX + 0x1c) * 25.0 + *(float *)(in_EDX + 8);
        local_134 = *(float *)(in_EDX + 0x20) * 25.0 + *(float *)(in_EDX + 0xc);
        local_130 = *(float *)(in_EDX + 0x24) * 25.0 + *(float *)(in_EDX + 0x10);
        NDebugOverlay::HorzArrow
                  (pVVar8,(Vector *)&local_138,5.0,local_140,local_144,iVar7,0xff,true,0.1);
      }
      iVar7 = iVar6 + 1;
      pcVar5 = (char *)CFmtStrN<256>::sprintf((CFmtStrN<256> *)&local_12c,"%d",iVar6);
      NDebugOverlay::Text(pVVar8,pcVar5,true,0.1);
      in_EDX = iVar2;
      iVar6 = iVar7;
    } while (iVar7 != 0x14);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)