L L4D2node

CBaseClient::PerformDisconnection

0x000f97a0 · 340 bytes · __thiscall

_ZN11CBaseClient20PerformDisconnectionEPKc

Decompiled

undefined (2 params)

/* CBaseClient::PerformDisconnection(char const*) */

void __thiscall CBaseClient::PerformDisconnection(CBaseClient *this,char *param_1)

{
  char cVar1;
  CSteam3Server *this_00;
  int iVar2;
  CBaseClient *pCVar3;
  undefined4 uVar4;
  int iVar5;
  int *piVar6;
  
  this_00 = (CSteam3Server *)Steam3Server();
  CSteam3Server::NotifyClientDisconnect(this_00,this);
  SetSignonState(this,0);
  iVar5 = *(int *)(this + 0x30);
  if (((-1 < iVar5) &&
      (iVar2 = (**(code **)(**(int **)(this + 0xb8) + 0x20))(*(int **)(this + 0xb8)), iVar5 < iVar2)
      ) && (pCVar3 = (CBaseClient *)
                     (**(code **)(**(int **)(this + 0xb8) + 0x1c))
                               (*(int **)(this + 0xb8),*(undefined4 *)(this + 0x30)),
           pCVar3 == this + 4)) {
    (**(code **)(**(int **)(this + 0xb8) + 0xc0))
              (*(int **)(this + 0xb8),*(undefined4 *)(this + 0x30));
    if (((1 < *(int *)(developer._28_4_ + 0x30)) ||
        (cVar1 = (**(code **)(*(int *)this + 0x78))(this), cVar1 == '\0')) ||
       (cVar1 = (**(code **)(*(int *)this + 0x94))(this), cVar1 != '\0')) {
      uVar4 = (**(code **)(*(int *)this + 0x1c))(this);
      ConMsg("Dropped %s from server (%s)\n",uVar4,param_1);
    }
    (**(code **)(s_GameEventManager + 0x18))(&s_GameEventManager,this);
    piVar6 = *(int **)(this + 0x28);
    if ((piVar6 != (int *)0x0) && (iVar5 = (**(code **)(*piVar6 + 0x20))(piVar6), iVar5 != 0)) {
      piVar6 = (int *)(**(code **)(**(int **)(this + 0x28) + 0x20))(*(int **)(this + 0x28));
      (**(code **)(*piVar6 + 0x128))(piVar6,*(undefined4 *)(this + 0x14));
      *(undefined4 *)(this + 0x28) = 0;
    }
    piVar6 = *(int **)(this + 0xe8);
    if (piVar6 != (int *)0x0) {
      (**(code **)(*piVar6 + 0x98))(piVar6,param_1);
      *(undefined4 *)(this + 0xe8) = 0;
    }
                    /* WARNING: Could not recover jumptable at 0x000f98d1. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*(int *)this + 0x54))();
    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)