L L4D2node

SetupSpan

0x000d0a80 · 186 bytes · __cdecl

_Z9SetupSpanii12NeighborSpanR10CVertIndexS1_

Decompiled

undefined (5 params)

/* SetupSpan(int, int, NeighborSpan, CVertIndex&, CVertIndex&) */

void SetupSpan(int param_1,int param_2,int param_3,undefined4 *param_4,undefined4 *param_5)

{
  CPowerInfo *this;
  undefined4 *puVar1;
  bool bVar2;
  
  bVar2 = (&g_EdgeDims)[param_2] == 0;
  this = (CPowerInfo *)GetPowerInfo(param_1);
  puVar1 = (undefined4 *)CPowerInfo::GetCornerPointIndex(this,param_2);
  *param_4 = *puVar1;
  puVar1 = (undefined4 *)CPowerInfo::GetCornerPointIndex(this,param_2 + 1U & 3);
  *param_5 = *puVar1;
  if (param_2 - 2U < 2) {
    if (param_3 == 1) {
      *(short *)((int)param_4 + (uint)bVar2 * 2) = (short)*(undefined4 *)(this + 0x2c);
    }
    else if (param_3 == 2) goto LAB_000d0b1c;
  }
  else {
    if (param_3 == 1) {
LAB_000d0b1c:
      *(short *)((int)param_5 + (uint)bVar2 * 2) = (short)*(undefined4 *)(this + 0x2c);
      return;
    }
    if (param_3 == 2) {
      *(short *)((int)param_4 + (uint)bVar2 * 2) = (short)*(undefined4 *)(this + 0x2c);
      return;
    }
  }
  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)