L L4D2node

VerifyNeighborConnections

0x000d1e90 · 519 bytes · __cdecl

_Z25VerifyNeighborConnectionsPP13CCoreDispInfoi

Decompiled

undefined (2 params)

/* VerifyNeighborConnections(CCoreDispInfo**, int) */

void VerifyNeighborConnections(CCoreDispInfo **param_1,int param_2)

{
  float fVar1;
  float fVar2;
  short sVar3;
  CDispUtilsHelper *pCVar4;
  bool bVar5;
  char cVar6;
  undefined2 *puVar7;
  CPowerInfo *pCVar8;
  short *psVar9;
  int iVar10;
  int iVar11;
  int local_68;
  CDispUtilsHelper *local_44;
  int local_40;
  undefined4 local_3c;
  CDispUtilsHelper *local_38;
  undefined2 local_34 [2];
  undefined2 local_30;
  CVertIndex local_2c [8];
  undefined4 local_24;
  undefined4 local_20;
  
  do {
    bVar5 = true;
    local_68 = 0;
    if (0 < param_2) {
      do {
        iVar11 = 0;
        pCVar4 = (CDispUtilsHelper *)param_1[local_68];
        do {
          local_38 = (CDispUtilsHelper *)0x0;
          local_30 = 0;
          local_24 = 0;
          local_34[0] = 0;
          local_20 = 0;
          local_3c = 0xffffffff;
          local_44 = pCVar4;
          local_40 = iVar11;
          while (cVar6 = CDispEdgeIterator::Next((CDispEdgeIterator *)&local_44), cVar6 != '\0') {
            cVar6 = VerifyNeighborVertConnection
                              (pCVar4,(CVertIndex *)local_34,local_38,local_2c,iVar11);
            if (cVar6 == '\0') {
              puVar7 = (undefined2 *)(**(code **)(*(int *)pCVar4 + 4))(pCVar4,iVar11);
              *puVar7 = 0xffff;
              puVar7[3] = 0xffff;
              pCVar8 = (CPowerInfo *)(*(code *)**(undefined4 **)pCVar4)(pCVar4);
              psVar9 = (short *)CPowerInfo::GetCornerPointIndex(pCVar8,0);
              sVar3 = psVar9[1];
              iVar10 = (*(code *)**(undefined4 **)pCVar4)(pCVar4);
              fVar1 = *(float *)(((int)*psVar9 + (int)sVar3 * *(int *)(iVar10 + 0x24)) * 0x90 +
                                 *(int *)(pCVar4 + 0x1b8) + 0x30);
              pCVar8 = (CPowerInfo *)(*(code *)**(undefined4 **)pCVar4)(pCVar4);
              psVar9 = (short *)CPowerInfo::GetCornerPointIndex(pCVar8,0);
              sVar3 = psVar9[1];
              iVar10 = (*(code *)**(undefined4 **)pCVar4)(pCVar4);
              fVar2 = *(float *)(((int)*psVar9 + (int)sVar3 * *(int *)(iVar10 + 0x24)) * 0x90 +
                                 *(int *)(pCVar4 + 0x1b8) + 0x2c);
              pCVar8 = (CPowerInfo *)(*(code *)**(undefined4 **)pCVar4)(pCVar4);
              psVar9 = (short *)CPowerInfo::GetCornerPointIndex(pCVar8,0);
              sVar3 = psVar9[1];
              iVar10 = (*(code *)**(undefined4 **)pCVar4)(pCVar4);
              Warning("Warning: invalid neighbor connection on displacement near (%.2f %.2f %.2f)\n"
                      ,(double)*(float *)(((int)*psVar9 + (int)sVar3 * *(int *)(iVar10 + 0x24)) *
                                          0x90 + *(int *)(pCVar4 + 0x1b8) + 0x28),(double)fVar2,
                      (double)fVar1);
              bVar5 = false;
            }
          }
          iVar11 = iVar11 + 1;
        } while (iVar11 != 4);
        local_68 = local_68 + 1;
      } while (local_68 < param_2);
    }
  } while (!bVar5);
  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)