L L4D2node

CBaseClient::Clear

0x000f9900 · 380 bytes · __thiscall

_ZN11CBaseClient5ClearEv

Decompiled

undefined (1 param)

/* CBaseClient::Clear() */

void __thiscall CBaseClient::Clear(CBaseClient *this)

{
  int *piVar1;
  
  piVar1 = *(int **)(this + 0xe8);
  if (piVar1 != (int *)0x0) {
    (**(code **)(*piVar1 + 0x98))(piVar1,"Disconnect by server.\n");
    *(undefined4 *)(this + 0xe8) = 0;
  }
  if (*(int *)(this + 0xb0) != 0) {
    KeyValues::deleteThis();
    *(undefined4 *)(this + 0xb0) = 0;
    *(undefined4 *)(this + 0xac) = 0;
  }
  (**(code **)(*(int *)this + 0x100))(this);
  SetSignonState(this,0);
  *(undefined4 *)(this + 0xf0) = 0xffffffff;
  *(undefined4 *)(this + 0xf8) = 0;
  *(undefined4 *)(this + 0xf4) = 0;
  if (*(CFrameSnapshot **)(this + 0xfc) != (CFrameSnapshot *)0x0) {
    CFrameSnapshot::ReleaseReference(*(CFrameSnapshot **)(this + 0xfc));
    *(undefined4 *)(this + 0xfc) = 0;
  }
  *(undefined4 *)(this + 0x210) = 0xffffffff;
  this[0x214] = (CBaseClient)0x0;
  this[0x216] = (CBaseClient)0x0;
  this[0x10] = (CBaseClient)0x0;
  this[0x11] = (CBaseClient)0x0;
  this[0x2c] = (CBaseClient)0x0;
  *(undefined4 *)(this + 0x14) = 0;
  *(undefined4 *)(this + 0x28) = 0;
  this[0xbc] = (CBaseClient)0x0;
  *(undefined8 *)(this + 0x218) = 0;
  *(undefined4 *)(this + 0x220) = 0;
  this[0x215] = (CBaseClient)0x0;
  *(undefined4 *)(this + 0x38) = 0;
  this[0x3c] = (CBaseClient)0x0;
  this[0x8c] = (CBaseClient)0x0;
  *(undefined4 *)(this + 0xc0) = 0;
  *(undefined4 *)(this + 0x108) = 0xffffffff;
  *(undefined4 *)(this + 0x20c) = 0;
  *(undefined4 *)(this + 0xe4) = 0;
  this[0xb4] = (CBaseClient)0x0;
  this[0xb5] = (CBaseClient)0x0;
  *(undefined4 *)(this + 0x100) = 0;
  this[0x217] = (CBaseClient)0x0;
  _V_memset(this + 0xc4,0,0x20);
  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)