L L4D2node

GetNodeIndexFromComponents

0x000bce90 · 80 bytes · __cdecl

_Z26GetNodeIndexFromComponentsii

Decompiled

undefined (2 params)

/* GetNodeIndexFromComponents(int, int) */

uint GetNodeIndexFromComponents(int param_1,int param_2)

{
  byte bVar1;
  uint uVar2;
  byte bVar3;
  
  if (param_1 == 0) {
    uVar2 = 0;
  }
  else {
    bVar3 = 0;
    uVar2 = 0;
    do {
      bVar1 = bVar3 & 0x1f;
      bVar3 = bVar3 + 2;
      uVar2 = uVar2 | (param_1 & 1U) << bVar1;
      param_1 = param_1 >> 1;
    } while (param_1 != 0);
  }
  if (param_2 != 0) {
    bVar3 = 1;
    do {
      bVar1 = bVar3 & 0x1f;
      bVar3 = bVar3 + 2;
      uVar2 = uVar2 | (param_2 & 1U) << bVar1;
      param_2 = param_2 >> 1;
    } while (param_2 != 0);
  }
  return uVar2;
}

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)