L L4D2node

AddModelDebugOverlay

0x00189ab0 · 267 bytes · __cdecl

_Z20AddModelDebugOverlayRK15DrawModelInfo_tRK18DrawModelResults_tRK6Vector

Decompiled

undefined (3 params)

/* AddModelDebugOverlay(DrawModelInfo_t const&, DrawModelResults_t const&, Vector const&) */

void AddModelDebugOverlay(DrawModelInfo_t *param_1,DrawModelResults_t *param_2,Vector *param_3)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  undefined4 *puVar5;
  byte bVar6;
  
  bVar6 = 0;
  iVar2 = CUtlVector<ModelDebugOverlayData_t,CUtlMemory<ModelDebugOverlayData_t,int>>::InsertBefore
                    ((CUtlVector<ModelDebugOverlayData_t,CUtlMemory<ModelDebugOverlayData_t,int>> *)
                     &s_SavedModelInfo,DAT_003a55f4);
  puVar3 = (undefined4 *)(iVar2 * 0x238 + s_SavedModelInfo);
  puVar5 = puVar3;
  for (iVar2 = 0x78; iVar2 != 0; iVar2 = iVar2 + -1) {
    *puVar5 = *(undefined4 *)param_1;
    param_1 = param_1 + (uint)bVar6 * -8 + 4;
    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;
  }
  puVar3[0x78] = *(undefined4 *)param_2;
  puVar3[0x79] = *(undefined4 *)(param_2 + 4);
  puVar3[0x7a] = *(undefined4 *)(param_2 + 8);
  puVar3[0x7b] = *(undefined4 *)(param_2 + 0xc);
  puVar3[0x7c] = *(undefined4 *)(param_2 + 0x10);
  puVar3[0x7d] = *(undefined4 *)(param_2 + 0x14);
  puVar3[0x7e] = *(undefined4 *)(param_2 + 0x18);
  uVar1 = *(undefined4 *)(param_2 + 0x20);
  puVar3[0x7f] = *(undefined4 *)(param_2 + 0x1c);
  puVar3[0x80] = uVar1;
  iVar2 = *(int *)(param_2 + 0x44);
  puVar3[0x89] = 0;
  if (iVar2 != 0) {
    puVar3[0x89] = iVar2;
    puVar3[0x8a] = puVar3 + 0x81;
    if (0 < iVar2) {
      iVar4 = 0;
      do {
        (puVar3 + 0x81)[iVar4] = *(undefined4 *)(param_2 + iVar4 * 4 + 0x24);
        iVar4 = iVar4 + 1;
      } while (iVar4 != iVar2);
    }
  }
  puVar3[0x8b] = *(undefined4 *)param_3;
  puVar3[0x8c] = *(undefined4 *)(param_3 + 4);
  puVar3[0x8d] = *(undefined4 *)(param_3 + 8);
  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)