L L4D2node

CM_HeadnodeVisible

0x0011bb70 · 153 bytes · __cdecl

_Z18CM_HeadnodeVisibleiPKhi

Decompiled

undefined (3 params)

/* CM_HeadnodeVisible(int, unsigned char const*, int) */

uint CM_HeadnodeVisible(int param_1,uchar *param_2,int param_3)

{
  int iVar1;
  short sVar2;
  uint uVar3;
  
  while (-1 < param_1) {
    iVar1 = g_BSPData + param_1 * 0xc;
    uVar3 = CM_HeadnodeVisible(*(int *)(iVar1 + 4),param_2,param_3);
    if ((char)uVar3 != '\0') {
      return uVar3;
    }
    param_1 = *(uint *)(iVar1 + 8);
  }
  if (DAT_0039439c <= ~param_1) {
    Error("Cannot load corrupted map.\n");
  }
  sVar2 = *(short *)(~param_1 * 0x10 + DAT_00394398 + 4);
  if (sVar2 != -1) {
    return (int)(uint)param_2[(int)sVar2 >> 3] >> ((byte)sVar2 & 7) & 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)