L L4D2node

HasEdgeNeighbor

0x000d1b00 · 122 bytes · __cdecl

_Z15HasEdgeNeighborPK13CCoreDispInfoi

Decompiled

undefined (2 params)

/* HasEdgeNeighbor(CCoreDispInfo const*, int) */

undefined4 HasEdgeNeighbor(CCoreDispInfo *param_1,int param_2)

{
  int iVar1;
  CCoreDispInfo *pCVar2;
  CCoreDispInfo *pCVar3;
  int local_14;
  
  local_14 = 0;
  pCVar3 = param_1 + 0x130;
  pCVar2 = param_1 + 0x160;
  while( true ) {
    if ((byte)pCVar2[8] != 0) {
      if ((uint)*(ushort *)pCVar2 == param_2) {
        return 1;
      }
      iVar1 = 0;
      while (iVar1 = iVar1 + 1, iVar1 < (int)(uint)(byte)pCVar2[8]) {
        if ((uint)*(ushort *)(pCVar2 + iVar1 * 2) == param_2) {
          return 1;
        }
      }
    }
    if (((uint)*(ushort *)pCVar3 == param_2) || ((uint)*(ushort *)(pCVar3 + 6) == param_2)) break;
    local_14 = local_14 + 1;
    pCVar3 = pCVar3 + 0xc;
    pCVar2 = pCVar2 + 10;
    if (local_14 == 4) {
      return 0;
    }
  }
  return 1;
}

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)