L L4D2node

BuildMergedPlayerIndexListForSplitUser

0x006112f0 · 270 bytes · __cdecl

_Z38BuildMergedPlayerIndexListForSplitUseriR10CUtlVectorIi10CUtlMemoryIiiEE

Decompiled

undefined (2 params)

/* BuildMergedPlayerIndexListForSplitUser(int, CUtlVector<int, CUtlMemory<int, int> >&) */

void BuildMergedPlayerIndexListForSplitUser(int param_1,CUtlVector *param_2)

{
  byte *pbVar1;
  int *piVar2;
  char cVar3;
  int iVar4;
  byte *pbVar5;
  int local_14;
  int local_10;
  
  pbVar1 = *(byte **)(gpGlobals + 0x58);
  if ((uint)param_1 < 0x800) {
    if (pbVar1 == (byte *)0x0) {
      return;
    }
    pbVar5 = pbVar1 + param_1 * 0x10;
    if ((pbVar1[param_1 * 0x10] & 2) == 0) goto LAB_0061132a;
  }
  else if (pbVar1 == (byte *)0x0) {
    return;
  }
  pbVar5 = pbVar1;
  if ((*pbVar1 & 2) != 0) {
    return;
  }
LAB_0061132a:
  piVar2 = *(int **)(pbVar5 + 0xc);
  if ((piVar2 != (int *)0x0) && (iVar4 = (**(code **)(*piVar2 + 0x18))(piVar2), iVar4 != 0)) {
    local_14 = param_1;
    cVar3 = (**(code **)(*engine + 0x1c8))(engine,param_1);
    if ((cVar3 != '\0') && (iVar4 = (**(code **)(*engine + 0x1cc))(engine,param_1), iVar4 != 0)) {
      local_14 = iVar4 - *(int *)(gpGlobals + 0x58) >> 4;
    }
    CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
              ((CUtlVector<int,CUtlMemory<int,int>> *)param_2,*(int *)(param_2 + 0xc),&local_14);
    iVar4 = (**(code **)(*engine + 0x1d4))(engine,local_14,1);
    if (iVar4 != 0) {
      local_10 = iVar4 - *(int *)(gpGlobals + 0x58) >> 4;
      CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
                ((CUtlVector<int,CUtlMemory<int,int>> *)param_2,*(int *)(param_2 + 0xc),&local_10);
    }
  }
  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)