L L4D2node

CNetChan::AttachSplitPlayer

0x001b4ec0 · 76 bytes · __thiscall

_ZN8CNetChan17AttachSplitPlayerEiP11INetChannel

Decompiled

undefined (3 params)

/* CNetChan::AttachSplitPlayer(int, INetChannel*) */

void __thiscall CNetChan::AttachSplitPlayer(CNetChan *this,int param_1,INetChannel *param_2)

{
  short sVar1;
  int local_14;
  INetChannel *local_10;
  
  local_14 = param_1;
  local_10 = param_2;
  sVar1 = CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>
          ::Find((CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>
                  *)(this + 0x4240),(SplitPlayer_t *)&local_14);
  if (sVar1 != -1) {
    return;
  }
  CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>
  ::Insert((CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>
            *)(this + 0x4240),(SplitPlayer_t *)&local_14);
  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)