L L4D2node

VerifyNeighborVertConnection

0x000d1d60 · 279 bytes · __cdecl

_Z28VerifyNeighborVertConnectionP16CDispUtilsHelperRK10CVertIndexPKS_S3_i

Decompiled

undefined (5 params)

/* VerifyNeighborVertConnection(CDispUtilsHelper*, CVertIndex const&, CDispUtilsHelper const*,
   CVertIndex const&, int) */

undefined4
VerifyNeighborVertConnection
          (CDispUtilsHelper *param_1,CVertIndex *param_2,CDispUtilsHelper *param_3,
          CVertIndex *param_4,int param_5)

{
  CDispUtilsHelper *pCVar1;
  int iVar2;
  int iVar3;
  short local_24;
  short local_22;
  short local_20;
  short local_1e;
  
  local_22 = -1;
  local_24 = -1;
  pCVar1 = (CDispUtilsHelper *)
           TransformIntoNeighbor(param_1,param_5,param_2,(CVertIndex *)&local_24);
  if (pCVar1 == (CDispUtilsHelper *)0x0) {
    return 1;
  }
  if (((pCVar1 == param_3) && (local_24 == *(short *)param_4)) &&
     (local_22 == *(short *)(param_4 + 2))) {
    local_1e = -1;
    local_20 = -1;
    iVar2 = (*(code *)**(undefined4 **)pCVar1)(pCVar1);
    iVar3 = 0;
    iVar2 = 1 << ((byte)*(undefined4 *)(iVar2 + 0x1c) & 0x1f);
    if (local_24 != 0) {
      if (iVar2 == local_22) {
        iVar3 = 1;
      }
      else if (iVar2 == local_24) {
        iVar3 = 2;
      }
      else {
        if (local_22 != 0) {
          return 0;
        }
        iVar3 = 3;
      }
    }
    pCVar1 = (CDispUtilsHelper *)
             TransformIntoNeighbor(pCVar1,iVar3,(CVertIndex *)&local_24,(CVertIndex *)&local_20);
    if (((param_1 == pCVar1) && (*(short *)param_2 == local_20)) &&
       (*(short *)(param_2 + 2) == local_1e)) {
      return 1;
    }
  }
  return 0;
}

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)