L L4D2node

CBaseClient::Connect

0x000f9a90 · 353 bytes · __thiscall

_ZN11CBaseClient7ConnectEPKciP11INetChannelbP10CUtlVectorI16NetMessageCvar_t10CUtlMemoryIS5_iEE

Decompiled

undefined (6 params)

/* CBaseClient::Connect(char const*, int, INetChannel*, bool, CUtlVector<NetMessageCvar_t,
   CUtlMemory<NetMessageCvar_t, int> >*) */

void __thiscall
CBaseClient::Connect
          (CBaseClient *this,char *param_1,int param_2,INetChannel *param_3,bool param_4,
          CUtlVector *param_5)

{
  int *piVar1;
  char cVar2;
  KeyValues *this_00;
  CBaseClient *pCVar3;
  CBaseClient *pCVar4;
  KeyValues *this_01;
  uint in_stack_ffffffc8;
  char *pcVar5;
  
  COM_TimestampedLog("CBaseClient::Connect");
  (**(code **)(*(int *)this + 0x54))(this);
  *(int *)(this + 0x38) = param_2;
  *(undefined4 *)(this + 0xac) = 0;
  this_00 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffc8);
  pcVar5 = "userinfo";
  this_01 = this_00;
                    /* try { // try from 000f9afe to 000f9b02 has its CatchHandler @ 000f9c07 */
  KeyValues::KeyValues(this_00,"userinfo",(IKeyValuesSystem *)0x0,false);
  *(KeyValues **)(this + 0xb0) = this_00;
  if (param_5 == (CUtlVector *)0x0) {
    (**(code **)(*(int *)this + 0xf8))(this,param_1);
  }
  else {
    if (*(int *)(this + 0xac) < 0x3e9) {
      ApplyConVars((CBaseClient *)this_01,(CUtlVector *)pcVar5);
    }
    pCVar3 = (CBaseClient *)(**(code **)(*(int *)this + 0x28))(this,"name");
    pCVar4 = (CBaseClient *)param_1;
    if ((pCVar3 != (CBaseClient *)0x0) && (pCVar4 = pCVar3, *pCVar3 == (CBaseClient)0x0)) {
      pCVar4 = (CBaseClient *)param_1;
    }
    (**(code **)(*(int *)this + 0xf8))(this,pCVar4);
    param_1 = (char *)pCVar4;
  }
  this[0x214] = (CBaseClient)param_4;
  if (param_4) {
    pCVar4 = (CBaseClient *)Steam3Server();
    param_1 = (char *)this;
    CSteam3Server::NotifyLocalClientConnect(pCVar4);
  }
  *(INetChannel **)(this + 0xe8) = param_3;
  if (((param_3 != (INetChannel *)0x0) && (piVar1 = *(int **)(this + 0xb8), piVar1 != (int *)0x0))
     && (cVar2 = (**(code **)(*piVar1 + 0x68))(piVar1,param_1), cVar2 != '\0')) {
    (**(code **)(**(int **)(this + 0xe8) + 0xfc))(*(int **)(this + 0xe8),1);
  }
  SetSignonState(this,2);
  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)