L L4D2node

GCSDK::CGCBase::StartPlaying

0x0007b460 · 170 bytes · __thiscall

_ZN5GCSDK7CGCBase12StartPlayingERK8CSteamIDS3_

Decompiled

undefined (3 params)

/* GCSDK::CGCBase::StartPlaying(CSteamID const&, CSteamID const&) */

void __thiscall GCSDK::CGCBase::StartPlaying(CGCBase *this,CSteamID *param_1,CSteamID *param_2)

{
  CGCGSSession *this_00;
  CGCUserSession *pCVar1;
  CGCGSSession *this_01;
  undefined4 uVar2;
  undefined4 local_28;
  undefined4 local_24;
  CGCUserSession *local_20;
  
  pCVar1 = (CGCUserSession *)FindUserSession(this,param_1);
  if (pCVar1 == (CGCUserSession *)0x0) {
    uVar2 = FindOrLoadSOCache(this,param_1);
    pCVar1 = (CGCUserSession *)(**(code **)(*(int *)this + 0x40))(this,param_1,uVar2);
    local_24 = *(undefined4 *)(param_1 + 4);
    local_28 = *(undefined4 *)param_1;
    local_20 = pCVar1;
    CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
    ::Insert((CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
              *)(this + 0x13c),(Node_t *)&local_28);
  }
  this_01 = (CGCGSSession *)FindOrCreateGSSession(this,param_2);
  this_00 = *(CGCGSSession **)(pCVar1 + 0xc);
  if (this_01 != this_00) {
    if (this_00 != (CGCGSSession *)0x0) {
      CGCGSSession::RemoveUser(this_00,pCVar1);
    }
    *(CGCGSSession **)(pCVar1 + 0xc) = this_01;
    if (this_01 != (CGCGSSession *)0x0) {
      CGCGSSession::AddUser(this_01,pCVar1);
    }
  }
  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)